inside backend/app/users/models/user.py, add the andrew email to the ADMIN_EMAILS constant. Push, then make sure in the ec2 isntance that the user was added successfully.
Please ensure you have uv and npm (use NVM in install) installed.
Run inside backend
uv syncRun inside frontend
npm installAlternatively, run the following inside your parent folder
chmod +x ./setup.sh
./setup.shTo run the backend in terminal:
- cd into backend
- make a .env file in backend based on the
DATABASE_URLfound in.env.example - run the following for something
docker-compose up -d- if you made changes since last time (?) then migrate:
make db-migrate
uv run alembic upgrade head- run the following to start server on http://localhost:8000
uv run uvicorn app.app:app --reloadRemove the reload flag if you'd like to stop the server from refreshing for file changes
- To interact, use curl (changing the values in the json)
curl -X POST http://localhost:8000/ -H "Content-Type: application/json" -d '{"username":"test"}'- to actually view the database, make sure you have
postgresqlinstalled and then run
psql -h localhost -p 5432 -U user -d dbthe password is password lol
then also do exit; to get out of SQL and stuff
- If new schema is added, run the backend, cd into frontend, and run
npx openapi-typescript ../backend/dist/openapi.json -o ./src/api/schema.d.tsTo edit with Mantine:
npm install @mantine/core @mantine/hooksTo look at the frontend (cd into the folder):
npm run devType q to exit. Have the sql running to make sure the two are working together as expected
make specto sync openapi schema from backend to frontendnpm run formatto format withprettier&npm run lint:fixto lint
make specto rewrite the openapi spec tobackend/dist/openapimake formatto format usingruffmake checkto lint usingruffmake fixto format + lint fix whatever you can.- If trying to configure mappers, you can use
# noqafor wildcard imports
- If trying to configure mappers, you can use