- Authentication using Auth.js
- N level of nested comments using ltree type
- Customize community UI
- Choose between background color or image, upload community avatar, etc
- Join/Leave community
- Parallel post route
- Optimistic updates for a better user experience
- And more...
First, clone the project
git clone https://github.com/Agreatdayforfreedom/Red.dot---Next.js-Reddit-Clone-.git
and copy these environment variables into a .env file
AUTH_SECRET=
NEXTAUTH_URL=
DATABASE_URL=postgres[ql]://[username[:password]@][host[:port],]/database[?parameter_list]
replace DATABASE_URL
with the respective uri.
Create a postgres instance
docker run --name psql-reddot -e POSTGRES_PASSWORD=root -d postgres
Generate Prisma client
npx prisma generate
then copy the content of init.sql
directly in to the postgres CLI
and that's all you need to get started!