An application for voting on your favourite technology/development quotes. It's like ranking the stars but for geeks ✨.
- Vote between two quotes
- See the overall results (cached and revalidated after 10 minutes once a user visits the /results page)
- Next.js SSR React framework
- Tailwind.css for utility-first CSS styling
- Prisma as Database ORM
- Planetscale as MySQL database host
Prerequisite:
- Local MySQL database / Planetscale database with local connection
Clone down this repository. You will need node
and npm
installed globally on your machine.
Setup
npm install
- Create
.env
file - Add a
DATABASE_URL=
variable with the connection string to your MySQL instance - Generate artifacts (e.g. Prisma Client) -
npx prisma generate
- Generate db schema -
npx prisma db push
- Seed the database with quotes -
npm run ts-node ./scripts/db-backfill.ts
- Run the dev server -
npm run dev