A Typescript fantasy baseball/football drafting site web project using Next.js (App Router) and Tailwind, and Postgres. User authentication (username/password) has been set up using NextAuth.js.
This boilerplate contains:
- 🔑 User auth and session management using NextAuth.js
- 👪 ORM using Prisma
- 📄 A user signup page, sign in page, and user list page using React, Tailwind, and Daisy UI
- 🌍 State management using Redux RTK query
- ✅ CI/CD using Github Actions
- 💻 E2E testing using Cypress
- 🤡 Unit testing using Jest
# next-auth
SECRET=TODO
# supabase
NEXT_PUBLIC_SUPABASE_URL=TODO
NEXT_PUBLIC_SUPABASE_ANON_KEY=TODO
# database
POSTGRES_HOSTNAME=localhost
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOSTNAME}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public
DIRECT_URI=${DATABASE_URI}
- Run the following in the root directory
npm run install
npm migrate
- For automatic tagging, allow read and write permissions for workflows in your github repo's Settings > Actions > General > Workflow permissions section.
The following command will containerize, build, and start the database, backend, and frontend
npm run up
npm run dev
- Sign up and create a project on supabase.
- Create a public storage bucket and add
SUPABASE_BUCKET
to the.env
above - Add a policy to your bucket that allows
SELECT
,INSERT
,UPDATE
, andDELETE
. - From Settings > API, add your URL and anon/public API keys to the
.env
asSUPABASE_URL
andSUPABASE_ANON_KEY
.