This is a simple discuss-style application built to familiarize myself with Next.js.
- Next.js - app
- NextAuth.js - for auth purposes
- Prisma - ORM
- SQLite - SQL file-based Database
- Tailwind - for styling
- Zod - for input validation
To complete the setup you need to create a GitHub OAuth application. Copy .env
file and rename the copy to the .env.local
. Set up the application variables:
DATABASE_URL="file:./dev.db"
- path to your SQLite db file.AUTH_SECRET
- should be your secret wording (for the client)GITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
should be copied from your freshly-created GitHub OAuth application.
Generate database via Prisma (if you want to have a database in the repository: delete prisma/dev.db
from .gitignore
):
npx prisma init --datasource-provider sqlite && npx prisma generate
Run the development server:
npm run dev
Or start the production-ready application:
npm run start
Open http://localhost:3000 with your browser to see the result.
- Sign In/Sign Up process via GitHub account
- Create Topics
- Create Posts in Topics
- Leave comments in Posts
- Search Posts