Skip to content

phongo1/To-Do-App

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Environment Setup (.env)

Before running the app, create a .env file in the project root with the following variables. These power the database (Prisma), authentication (NextAuth), and Google OAuth.

Example .env:

# Database (PostgreSQL)
# Use your own Postgres connection string. Prisma Accelerate or direct connection both work.
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public"

# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="replace-with-a-long-random-string"

# Google OAuth (NextAuth provider)
GOOGLE_CLIENT_ID="your-google-oauth-client-id"
GOOGLE_CLIENT_SECRET="your-google-oauth-client-secret"

Notes:

  • Generate NEXTAUTH_SECRET with: openssl rand -base64 32 (or any strong random string).
  • In Google Cloud Console → Credentials, create an OAuth 2.0 Client ID (Web application), and set Authorized redirect URI to:
    • http://localhost:3000/api/auth/callback/google
  • If you use Prisma Accelerate, set DATABASE_URL per Accelerate’s provided URL. Otherwise, use a standard Postgres URL as shown above.

After adding .env, run Prisma migrations and generate the client if needed:

npx prisma migrate dev
npx prisma generate

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Fullstack practice: Next.js, Prisma, MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors