Pun Generator is a web app built using React, Next.js, TypeScript, and PostgreSQL, hosted on Vercel. It uses the Next.js App Router.
The latest changes from the main branch are auto deployed to https://pungeneratorapp.com
It is still in development, so features may be incomplete. Head over to the Roadmap section to check out upcoming features.
Before running the app locally, you will need the following set up:
- Install Docker on your machine to run docker-compose.
- Set up a
.envfile. See.env.sampleto see what environment variables are required. - Add your Postgres url to the
.envfile. - Set up a
clerkdevelopment instance and addNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEYto the.envfile to set up authentication. Instructions to set up clerk authentication: https://clerk.com/docs/quickstarts/setup-clerk
Install dependencies
npm installStart up local PostgreSQL database (requires docker)
docker-compose upStart the development server:
npm run devOpen http://localhost:3000 with your browser.
When a schema change is made, the following must be done:
- Generate new prisma client in draft mode to preview the migration
npx prisma migrate dev --name name-of-migration --create-only- Save and apply the migration. This will also generate an updated prisma client
npx prisma migrate devIn production, the vercel-build script takes care of the above steps.
"vercel-build": "prisma generate && prisma migrate deploy && next build"
To evolve schema without downtime, use the expand and contract pattern: https://www.prisma.io/docs/orm/prisma-migrate/workflows/customizing-migrations#example-use-the-expand-and-contract-pattern-to-evolve-the-schema-without-downtime
- Allow users to delete their own puns.
- Sorting and filtering by: random, top, newest.
- Pagination
- Profanity Filter
- Refactor components to optimize dynamic and static builds.
- Finish writing playwright tests.
- Finish writing Unit tests.
- Observability (OpenTelemetry)
- Analytics (useReportWebVitals / Vercel Analytics / Google Analytics)
- Add Sentry to server actions