- Clone the repo to your local machine
- Run
npm installin 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.examplefile to.envand fill in the required values for the environment variables - In
server/, runnpm run db:upto run all the migrations and seeders - Run
npm run devto run the server - Follow the Convex Installation steps
- On a separate terminal, go into
client/and runnpm run devto run the client app
This project uses Convex to manage document files. If you want access to our team, please reach out to bipsanchez.work@gmail.com.
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 devand configure an existing project in the team'spaper-trailproject - In
client/, create aclient/convex.jsonfile 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
upfunction and make sure thedownfunction 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
upfunction and make sure thedownfunction reverses these changes - To apply the seeder, run
npm run db:seed -- up. To revert it, runnpm run db:seed -- down