A modern ecommerce application built with Next.js, TypeScript, Tailwind CSS, Drizzle ORM, and Neon PostgreSQL.
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Database: Neon PostgreSQL
- ORM: Drizzle ORM
- Authentication: Better Auth (configured)
- State Management: Zustand
- Product catalog with Nike items
- Responsive design with Tailwind CSS
- Database integration with Drizzle ORM
- Type-safe database operations
- Server-side rendering
- Node.js 18+
- A Neon PostgreSQL database
- Clone and install dependencies:
npm install- Environment Variables:
Copy
.env.exampleto.env.localand configure:
cp .env.example .env.localAdd your Neon database URL:
DATABASE_URL="postgresql://username:password@hostname:port/database"
- Database Setup:
# Generate migrations
npm run db:generate
# Push schema to database
npm run db:push
# Seed with sample Nike products
npm run db:seed- Run the development server:
npm run devOpen http://localhost:3000 to see the Nike store.
npm run db:generate- Generate migration filesnpm run db:push- Push schema changes to databasenpm run db:migrate- Run migrationsnpm run db:seed- Seed database with sample Nike products
src/
├── app/ # Next.js app router
├── components/ # React components
├── lib/
│ └── db/ # Database configuration and schema
│ ├── index.ts # Database connection
│ ├── schema.ts # Drizzle schema definitions
│ └── seed.ts # Database seeding script
id- Serial primary keyname- Product namedescription- Product descriptionprice- Decimal priceimageUrl- Product image URLcategory- Product categorybrand- Product brandstock- Available stockcreatedAt- Creation timestampupdatedAt- Update timestamp
The app includes sample Nike products with real product images and descriptions. The homepage displays all products in a responsive grid layout.
The easiest way to deploy your Next.js app is to use the Vercel Platform.
Make sure to add your DATABASE_URL environment variable in the Vercel dashboard.