- node.js (v18+)
- postgresql database
- npm or yarn
-
Clone the repository
git clone <repo-url> cd KanBAM
-
Backend Setup
cd backend npm install # Create a .env file and define DATABASE_URL and JWT_SECRET npx prisma migrate dev npm run dev
-
Frontend Setup
cd ../frontend npm install npm run dev
To run all tests (from repo root):
npm run testBackend test commands:
cd backend
npm test # same as npm run test:all
npm run test:all # runs every backend test file in sequence
npm run test:watch # watch mode (vitest)
npx vitest run # run all backend tests oncenpx prisma studio # open database admin interface
npx prisma generate # regenerate prisma client after schema changes
npx prisma migrate dev # apply new migrations to database
npx prisma migrate reset # reset database and apply all migrations (destructive), will need to do after running tests since they modify the databaseBase URL: http://localhost:3000
All backend routes are mounted under /api.
Authentication notes:
- Public auth routes: login, register, refresh
- All other routes require the
access_tokenhttp-only cookie - Refresh flow uses the
refresh_tokenhttp-only cookie - When calling from frontend, send cookies with
credentials: 'include'
POST /login- login user and set auth cookiesPOST /register- register a new userPOST /refresh- rotate access and refresh tokensPOST /logout- clear auth cookies (auth required)GET /me- get current user profile (auth required)GET /all- list all users, global admin only (auth required)PATCH /avatar- update current user avatar (auth required)DELETE /:id- delete user by id, global admin only (auth required)
POST /create- create projectGET /my-projects- get projects visible to current userPOST /add-member- add user membership to projectPOST /edit-name- update project namePOST /edit-description- update project descriptionPOST /archive- archive projectPOST /unarchive- unarchive projectPOST /change-role- change member role in projectGET /:id- get project details by idDELETE /:project_id/members/:user_id- remove member from projectDELETE /:id- delete project by id
POST /create- create board and default columnsGET /project/:project_id- list boards in a projectGET /:id- get full board dataPATCH /:id/rename- rename boardDELETE /:id- delete board
POST /create- create board columnPATCH /:id/rename- rename columnPATCH /:id/reorder- reorder column positionPATCH /:id/wip- update column wip limitDELETE /:id- delete column
POST /create- create storyGET /board/:board_id- list stories on boardGET /:id/assignees- list assignable users for storyGET /:id- get story with detailsPATCH /:id/finish- mark story finishedPATCH /:id- update story fieldsDELETE /:id- delete story
POST /create- create task/bug under a storyGET /:id/assignees- list assignable users for taskGET /:id- get task with detailsPATCH /:id/move- move task to another columnPATCH /:id/finish- mark task finishedPATCH /:id- update task fieldsDELETE /:id- delete task
GET /task/:taskId- list comments for a taskGET /story/:storyId- list comments for a storyPOST /create- create comment (task or story target)PATCH /:id- edit own commentDELETE /:id- delete own comment
GET /- list current user notificationsPATCH /:id/read- mark one notification as readPATCH /mark-all-read- mark all notifications as read