The Snippets App is a modern web application built with Next.js 15 that allows users to save, organize, and access their favorite code snippets in one centralized location.
Ensure the following are installed:
- Node.js 18 or later
- PostgreSQL
- A package manager: npm, yarn, pnpm, or bun
- Clone the repository
git clone https://github.com/your-username/snippets-app.git
cd snippets-app- Install dependencies
npm install- Set up environment variables
Create a .env file in the root directory:
DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/snippetsdb"Replace
USER,PASSWORD, andsnippetsdbwith your PostgreSQL credentials.
- Generate and migrate Prisma schema
npx prisma generate
npx prisma migrate dev --name init- Run the development server
npm run devVisit http://localhost:3000 in your browser.
- Create, edit, and delete code snippets
- Organize snippets by language or category
- Full-text search and filters
- Syntax highlighting
- Responsive design for desktop and mobile
- Built with Next.js 15 App Router and Server Actions
- PostgreSQL + Prisma ORM backend
app/ # App Router pages and layout
components/ # Reusable UI components
lib/ # Utility functions
prisma/ # Prisma schema and client
public/ # Static assets
styles/ # Tailwind CSS styles- Framework: Next.js 15 (App Router, Server Actions)
- Language: TypeScript
- Database: PostgreSQL
- ORM: Prisma
- Styling: Tailwind CSS
- UI Library: shadcn/ui