Next.js App Router implementation for AlgoHub.
- Public pages for algorithms, testimonies, events, login, signup, and testimony submission.
- Admin dashboard pages for algorithm CRUD, event management, organization management, testimony moderation, comment moderation, and user role management.
- Prisma PostgreSQL schema for jurisdictions, taxonomy, algorithms, testimonies, users, roles, organizations, comments, reactions, events, briefings, and news updates.
- API routes for algorithms, admin workflows, auth/session handling, testimony submission, comments, comment likes, and story reactions.
- Seed data for the initial database.
- Visual ERD in
public/database-erd.svgand UI/database field mapping indatabase-map.md.
Use both services:
- Neon hosts PostgreSQL.
- Vercel hosts the Next.js website.
Set these in Vercel and in any shell used to initialize the database:
DATABASE_URL="Neon pooled PostgreSQL connection string"
JURISDICTION_ID="pittsburgh"Do not commit the real DATABASE_URL.
After creating the Neon project and copying the pooled connection string:
npm install
npm run db:deploy
npm run db:seedThe seed creates algorithms, testimonies, comments, replies, likes, reactions, organizations, users, roles, community events, briefings, and news updates.
In Vercel:
- Import the GitHub repository.
- Set
DATABASE_URLandJURISDICTION_IDin Environment Variables. - Keep the build command as:
npm run buildThe build script runs prisma generate before next build.
admin@algostories.localnora.admin@algostories.localfacilitator@algostories.localmaria.facilitator@algostories.localorgmember@algostories.localresearcher@algostories.localcommunity@algostories.localjamal.community@algostories.local
The current login flow uses email-only accounts for access checks.
npm run build
npm run lint
npm run db:generate
npm run db:deploy
npm run db:seed