- Clone the repo to your local machine
- Run
npm install
in the root directory, the client directory, and the server directory - Create a db on your local machine (this project uses XAMPP) called
paper_trail_db_v2
- In
server/
, change the.env.example
file to.env
and fill in the required values for the environment variables - In
server/
, runnpm run db:up
to run all the migrations and seeders - Run
npm run dev
to run the server - Follow the Convex Installation steps
- On a separate terminal, go into
client/
and runnpm run dev
to run the client app
This project uses Convex to manage document files. If you want access to our team, please reach out to [email protected]
.
Note: Without access to Convex, user won't be able to create and edit documents.
Once your email is added to the Convex team, you can follow the installation process below:
- In
client/
, runnpx convex dev
and configure an existing project in the team'spaper-trail
project - In
client/
, create aclient/convex.json
file with the following data{ "functions": "./src/_convex" }
- Checkout to main locally and pull from main in remote repo
- Checkout to new feature branch using the format
[first-name-initial][last-name-initial]--[feature-description]
(e.g.bs--fix-navigation-bug
) - Once feature is implemented, push branch to remote repo (e.g.
git push --set-upstream origin bs--fix-navigation-bug
), make a PR, and request for review - Once PR is approved, merge PR to
main
- Change into the server directory and run
npm run db:migrate -- create --name [migration-name].ts
- Remove the boilerplate, as it doesn't play well with TS, and replace it with the boilerplate found in the previous migrations
- Make the changes you want to place in the db inside the
up
function and make sure thedown
function reverses these changes - To apply the migration, run
npm run db:migrate -- up
. To revert it, runnpm run db:migrate -- down
- Change into the server directory and run
npm run db:seed -- create --name [seeder-name].ts
- Remove the boilerplate, as it doesn't play well with TS, and replace it with the boilerplate found in the previous seeders
- Specify the data that you want placed in the db inside the
up
function and make sure thedown
function reverses these changes - To apply the seeder, run
npm run db:seed -- up
. To revert it, runnpm run db:seed -- down