Skip to content

NISHAN-AKALANKA/ds-api

Repository files navigation

ds-api

NestJS API for the Document Share app.

Stack

  • NestJS
  • Knex migrations and queries
  • Swagger documentation
  • Supabase Auth and Storage integration
  • Local or remote Postgres through DATABASE_URL

Setup

cp .env.example .env
pnpm install
pnpm knex:migrate
pnpm start:dev

Swagger runs at:

http://localhost:3000/docs

Environment

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:5173

First Admin

Sign 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';

About

document-share-api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors