@rocketmakers/orbit-slingshot
v2.0.5
Published
> TODO: description
Downloads
11
Keywords
Readme
orbit-slingshot
Accelerates the setup of a hosted, git managed templates repository.
Usage
This package is not intended to be installed as a dependency of any kind (e.g. dev, peer etc.). It contains a single executable .bin
script, that will output the required files for an Orbit enabled database, infrastructure and backend API. The aim of this is to begin domain specific development in as short a time as possible.
Set up notification templates repository
In order to enable user flows that require notifications (e.g. invite user) you must first set up a notification templates repository. There is a separate package/.bin script to slingshot the set up of this type of repository, for full documentation see the README.md
of @rocketmakers/orbit-slingshot-notify
Slingshot your repository
Run the following command and follow any subsequent CLI prompts, to execute the latest orbit-slingshot
script version:
npx @rocketmakers/orbit-slingshot orbit-slingshot
The main consideration within these CLI prompts is whether you need the root level files adding to your repository. If you have already used a Rocketmakers starter kit of some description, e.g. a frontend boilerplate, then you do not need these root level files
Steps after executing orbit-slingshot script
- [ ] Add a
.gitignore
file to the root of you repository (or add any relevant file paths such asclient/*
, to your existing.gitignore
)- [ ] Add any relevant files you want ignored from source control
- [ ] Find & replace all instances of
<INSERT_PROJECT_NAME>
with your project name (this will serve as your API name) - [ ] Find & replace all instances of
<INSERT_PROJECT_DB_NAME>
with your project name (this will serve as your database name) - [ ] If you added the root level files run a
make install
at the repository root directory - [ ] Run the following commands to set up your local database instances and run all of the necessary migrations
- [ ]
docker network create <INSERT_PROJECT_DB_NAME>
(only required during first time set up) - [ ]
cd <file_path_to_your_database_directory>
- [ ]
make run
- [ ]
- [ ] Complete the following steps to set up and run the backend API locally
- [ ] Populate the secret values in
backend/src/secrets/dev.enc.json
- [ ] Add
*.dec.*
to your.gitignore
file values (values added to the above secrets are decrypted and output tosecrets.dec.sh
)
- [ ] Add
- [ ] Populate the seed migration scripts in
<path_to_db_files>/deploy/V001.initialSchema.sql
- [ ] Add
*.dec.*
to your.gitignore
file values (values added to the above secrets are decrypted and output tosecrets.dec.sh
)
- [ ] Add
- [ ] Populate the values in
backend/src/secrets/userCreationData.sh
(this can be used for inviting users to the platform manually) - [ ]
cd backend
- [ ]
make setup
- [ ]
make start-api
- [ ] Populate the secret values in
After following the above steps you should be able to run the following to invite a user locally:
make create-user ENVIRONMENT=dev