Kickstart your project with this simple but modern full-stack starter app.
- TypeScript as the programming language
- Next.js as the React framework
- Next.js API routes for server-side API routes as the backend
- Prisma for migrations and database access
- PostgreSQL as the database
- NextAuth.js for authentication via GitHub (OAuth)
- ESLint extended by Prettier for code style
- Vercel for deployment
Based on Vercel's own Next.js Full-stack Starter.
- Clone the repository
- Install dependencies with
yarn
- Set up a local PostgreSQL database
- Rename
.env.template
to.env
and updateDATABASE_URL
to your PostgreSQL database URL - Create a GitHub OAuth app, and update the env variables
GITHUB_ID
andGITHUB_SECRET
- Run
yarn dev
to start the development server locally - Run
yarn prisma studio
to start the Prisma Studio UI
- Fork this repository (or click the "Use this template" button)
- Log in to Vercel and create a new project from the repository
- Set up a free PostgreSQL database on Heroku
- Create another GitHub OAuth app for production, and update the env variables
GITHUB_ID
andGITHUB_SECRET
- In Vercel, go to Project Settings > Environment Variables and set
DATABASE_URL
to your Heroku database URL, andGITHUB_ID
andGITHUB_SECRET
with your production GitHub OAuth app's credentials - Run
openssl rand -base64 32
to generate a random string and update the Vercel env variableNEXTAUTH_SECRET
with the output, and updateNEXTAUTH_URL
tohttps://you-domain.vercel.app/api/auth