This repository provides a standard setup for building Next.js applications integrated with Prisma as the ORM. Follow the instructions below to clone and use this project for your development.
- Standardized Project Structure: Organized folder layout for clarity.
- Prisma Integration: Pre-configured Prisma schema and client setup.
- Database Seeding: Seed script to populate your database with initial data.
- TypeScript Support: Fully configured TypeScript for type safety.
- Easy Setup: Step-by-step instructions for getting started.
- Node.js (>= 14.x)
- npm or Yarn
- A PostgreSQL database (or other supported databases)
Clone the repository:
Install the dependencies and devDependencies and start the server.
git clone https://github.com/Ariyamandebnath/Prisma-Next
cd your-repo-name
Install dependencies:
npm install
# or
yarn install
Set up environment variables: Create a .env
file in the root of the project and configure your database connection:
DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/DATABASE_NAME"
Run Prisma migrations: Initialize your database and apply migrations:
npx prisma migrate dev --name init
Seed the database (optional): If you want to populate your database with initial data:
npm run dev
# or
yarn dev
Run the application: Start the development server:
- Open your browser: Visit http://localhost:3000 to see your application running.
You can start building your Next.js application by adding components, pages, and API routes as needed. Use the Prisma client to interact with your database in your application logic.
If you would like to contribute to this project, feel free to submit a pull request or open an issue.
This project is licensed under The MIT license