NestJS API for the Document Share app.
- NestJS
- Knex migrations and queries
- Swagger documentation
- Supabase Auth and Storage integration
- Local or remote Postgres through
DATABASE_URL
cp .env.example .env
pnpm install
pnpm knex:migrate
pnpm start:devSwagger runs at:
http://localhost:3000/docs
DATABASE_URL can point to your local development database while SUPABASE_URL and SUPABASE_SECRET_KEY point to your remote Supabase project.
DATABASE_URL=postgresql://postgres:your_password@localhost:5432/document_share
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SECRET_KEY=sb_secret_...
SUPABASE_STORAGE_BUCKET=task-documents
FRONTEND_ORIGIN=http://localhost:5173Sign up through ds-app, create your profile, then promote that user:
update users
set role_id = (select id from roles where role = 'admin')
where id = 'SUPABASE_AUTH_USER_ID';