This is a Next.js project bootstrapped with create-next-app
, integrated with Prisma for database management.
- Next.js 13+ with App Router
- TypeScript
- Prisma ORM
- SQLite database (easily adaptable to other databases)
- Basic CRUD operations setup
To use this template, click the "Use this template" button on GitHub to create a new repository based on this template.
After creating your new repository, clone it to your local machine: bash git clone https://github.com/yourusername/your-repo-name.git cd your-repo-name
Install the dependencies:
npm install
Set up your database:
-
Update the
DATABASE_URL
in the.env
file to point to your database. -
Run the Prisma migration to create your database schema:
npx prisma migrate dev --name init
-
Generate the Prisma client:
npx prisma generate
Run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
/src/app
: Contains the Next.js application pages and API routes/prisma
: Contains the Prisma schema and migrations/src/components
: React components/src/lib
: Utility functions and shared code
This template includes basic CRUD operations. You can find examples in the API routes located in the /src/app/api
directory.
To modify the database schema:
- Edit the
prisma/schema.prisma
file - Run
npx prisma migrate dev --name your_migration_name
to create a new migration - Run
npx prisma generate
to update the Prisma client
To learn more about the technologies used in this template:
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details.
Contributions are welcome! Please feel free to submit a Pull Request.