We want to make it easy for anyone to create an app – whether you know how to code or not.
Choose from thousands of community-made building blocks, and string them together to create the app you’ve always wanted.
Docs and usage information are currently stored in the team's Notion project. When we open the application up for alpha users, we'll release the documentation more publicly.
After you have cloned this repo, run this setup script to set up your machine with the necessary dependencies to run and test this app:
% ./bin/setup
It assumes you have a machine equipped with Ruby, Postgres, etc. If not, set up your machine with this script.
After setting up, you can run the application using Heroku Local:
% heroku local
Our application uses GraphQL to define the API. GraphQL has a number of advantages over RESTful JSON endpoints. Notably,
- Each client request can fetch exactly the data it needs and no more.
- We get more granular control over what data can be accessed, with a simpler and less redundant API than JSON serializers.
- Our API is self-documenting, and automatically works with a wide range of tools like GraphiQL.
Once you have the project set up and running in development mode,
you can visit the /graphiql
route for the interactive API interface.
In order for Assemble to use your development machine as the server,
you'll need to use a tool like ngrok
to create a public tunnel to your local application.
When you have a public-facing URL,
update the APPLICATION_HOST
environment variable in .env
to point to the public URL.
-
After cloning the repository, run the setup script
./bin/setup
-
Make sure that postgres, and redis, are both installed and running locally.
-
Log into your GitHub account and go to your developer application settings.
-
Under the Developer applications panel - Click on "Register new application" and fill in the details:
- Application Name: Assemble Development
- Homepage URL:
http://localhost:3000
- Authorization Callback URL:
http://localhost:3000
-
On the confirmation screen, copy the
Client ID
andClient Secret
toGITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
in the.env.local
file. -
Run
foreman start
. Foreman will start the web server and the resque background job queue. NOTE:rails server
will not load the appropriate environment variables and you'll get a "Missingsecret_key_base
for 'development' environment" error. Similarly,heroku local
andforego start
will fail to properly load.env.local
. -
Open
localhost:3000
in a browser.
Ngrok allows Assemble to receive webhooks from GitHub. If you'd like to develop or test a feature involving GitHub sending a pull request notification to your local Assemble server you'll need to have ngrok or something similar set up.
To get started with ngrok, sign up for an ngrok account and configure ngrok locally by installing ngrok and running:
`ngrok authtoken <your-token>`
- Launch ngrok on port 3000 (we recommend running ngrok with a custom subdomain
for easy and persistent configuration, but this requires a paid ngrok account.
You can still run Assemble with a free ngrok account, but it will require keeping
the GitHub developer application configuration and your
.env.local
files up to date if your ngrok subdomain changes).
-
If you're using a custom subdomain:
ngrok http -subdomain=<your-initials>-assemble 3000
-
If you're using a free ngrok plan:
ngrok http 3000
-
Set the
HOST
variable in your.env.local
to your ngrok host, e.g.<your-subdomain>.ngrok.io
. -
Change
ENABLE_HTTPS
to 'yes' in the.env.local
file. -
Log into your GitHub account and go to your developer application settings.
-
Under the Developer applications panel - Click on "Register new application" and fill in the details:
- Application Name: Assemble Development
- Homepage URL:
https://<your-subdomain>.ngrok.io
- Authorization Callback URL:
https://<your-subdomain>.ngrok.io
-
On the confirmation screen, copy the
Client ID
andClient Secret
toGITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
in the.env.local
file. -
Run
foreman start
. Foreman will start the web server and the resque background job queue. NOTE:rails server
will not load the appropriate environment variables and you'll get a "Missingsecret_key_base
for 'development' environment" error. Similarly,heroku local
andforego start
will fail to properly load.env.local
. -
Open
https://<your-subdomain>.ngrok.io
in a browser.
Use the following guides for getting things done, programming well, and programming in style.
If you have previously run the ./bin/setup
script,
you can deploy to staging and production with:
$ ./bin/deploy staging
$ ./bin/deploy production