Modern e-commerce website built with Next.js, TypeScript, Tailwind CSS, and PostgreSQL.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js (optional)
- Node.js 18+
- PostgreSQL database
-
Clone the repository
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Update
.envwith your database credentials. -
Initialize the database:
npx prisma generate npx prisma db push npm run db:seed
-
Run the development server:
npm run dev
/src
/app # Next.js App Router pages
/components # Reusable UI components
/catalog # Product catalog components
/cart # Shopping cart components
/checkout # Checkout components
/layout # Layout components (Header, Footer)
/ui # Primitive UI components
/lib # Utilities and database client
/types # TypeScript type definitions
/prisma # Database schema and migrations
/public # Static assets
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run db:generate- Generate Prisma clientnpm run db:push- Push schema to databasenpm run db:migrate- Run database migrationsnpm run db:seed- Seed the database
- Product catalog with filtering and sorting
- Shopping cart with localStorage persistence
- Checkout flow (UI scaffold)
- Server-side pricing validation
- Mobile-first responsive design
MIT