NOTESLITE runs as a single Next.js app with:
- Next.js (App Router)
- React + TypeScript
- Prisma ORM
- PostgreSQL
- Clerk authentication
- Node.js 20+
- npm 10+
- PostgreSQL running locally or remotely
- Clerk project keys
- Install dependencies:
npm install- Create your local environment file:
cp .env.example .env- Fill
.envwith valid values:
DATABASE_URLNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYNEXT_PUBLIC_CLERK_SIGN_IN_URL=/auth/sign-inNEXT_PUBLIC_CLERK_SIGN_UP_URL=/auth/sign-upNEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/dashboardNEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/dashboard
Apply existing migrations:
npm run prisma:migrateGenerate Prisma Client (optional, usually auto-generated during migrate):
npm run prisma:generateOpen Prisma Studio (optional):
npm run prisma:studioStart development server:
npm run devOpen http://localhost:3000.
npm run dev- start Next.js in development modenpm run build- create production buildnpm run start- run production servernpm run lint- run ESLintnpm run prisma:migrate- apply dev migrations with Prismanpm run prisma:generate- generate Prisma clientnpm run prisma:studio- open Prisma Studio
app/- Next.js routes, pages, and API handlerscomponents/- UI and page shell componentslib/- shared server utilities (auth, Prisma helpers)prisma/schema.prisma- database modelsmiddleware.ts- auth route protection
- Sign in:
/auth/sign-in - Sign up:
/auth/sign-up /authredirects to/auth/sign-in
Do not run npm run prisma:migrate -- --name init on an existing project setup unless you are intentionally creating a brand-new migration. For normal setup, use:
npm run prisma:migratefrontend/ and backend/ are legacy reference folders from the older split architecture and are not used by the current runtime.
When submitting a PR, please use the following format for clear communication:
Name:
[Brief descriptive title of the PR]
Work Done:
[Concise summary of what was implemented or fixed, including any context about why the changes were needed]
Purpose:
[Explain the goal and benefit of these changes — what problem does it solve or what improvement does it provide?]
Changes Made:
- [Bullet point for each significant change]
- [Include both functional and refactoring changes]
- [Mention any breaking changes if applicable]
Files Changed:
- [List the main files that were modified]
Test/Verification:
- [How to verify the changes work correctly]
- [Any test commands or manual testing steps]
- [Build and lint verification status]
Name:
NOTESLITE Cleanup - Remove Unused Canvas Leftovers
Work Done:
Removed stale canvas-related code that was no longer used in the board client, including unused imports, unused state, and dead helper callbacks that were left behind after the canvas work was simplified.
Purpose:
This cleanup keeps the board client compiling cleanly, reduces noise in the component, and removes code paths that referenced undefined or unused canvas state.
Changes Made:
- Removed unused canvas imports from workspace-board-client.tsx
- Removed unused canvas state and updater hooks that were not wired into the current UI
- Removed the unused canvas branch from palette click handling
- Kept the existing board workflow intact while trimming dead code from the component
- Fixed the build error caused by the missing CanvasViewMode reference during the cleanup pass
Files Changed:
- workspace-board-client.tsx
Test/Verification:
- npm run build passed after the cleanup
- Confirmed the repo compiles successfully with the unused canvas leftovers removed