Modern e-commerce solution built with React, TypeScript, and SQLite
- ποΈ Product browsing with category filters
- π JWT-based user authentication
- π Persistent shopping cart
- π Admin dashboard with inventory management
- π Vite-powered frontend
- π¨ Tailwind CSS styling
Homepage - Product Browsing
Admin Dashboard
- Architecture: Clean Architecture with separation between presentation, application, and infrastructure layers
- API Layer: RESTful endpoints with JWT authentication middleware
- State Management: Global store using React Query for server state and Zustand for UI state
βββ client/ # React frontend
βββ server/ # Express backend
βββ shared/ # Shared types and utilities
βββ migrations/ # Database schema versions
βββ attached_assets/ # Design documents & resources
- Frontend: React 18, TypeScript, Vite
- State Management: React Query
- UI: Shadcn UI, Lucide Icons
- Backend: Node.js, Express
- Database: SQLite (Drizzle ORM)
cd client
npm install
cd ../server
npm install| Variable | Description | Required | Default |
|---|---|---|---|
| VITE_API_URL | Backend API base URL | Yes | http://localhost:5000 |
| DATABASE_URL | SQLite database path | Yes | file:../database.sqlite |
| JWT_SECRET | Secret for signing tokens | Yes | - |
| NODE_ENV | Runtime environment | No | development |
- Create
.envfile:
VITE_API_URL=http://localhost:5000
DATABASE_URL=file:../database.sqlite
JWT_SECRET=your_secure_secretnpm run migratePOST /api/auth/registerUser registrationPOST /api/auth/loginUser authenticationGET /api/auth/meGet current user
GET /api/productsList all productsGET /api/products/:idGet product detailsPOST /api/productsCreate new product (admin)
POST /api/ordersCreate new orderGET /api/ordersList user ordersGET /api/orders/:idGet order details
# Frontend
cd client
npm run dev
# Backend
cd ../server
npm start- Register with admin email pattern (username: admin, Password: admin123)
- Navigate to
/admin
- Production Build
cd client && npm run build
cd ../server && npm run build- Docker Setup
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
CMD ["node", "dist/server.js"]- Hosting Recommendations
- Frontend: Vercel/Netlify
- Backend: Railway/Render
- Database: Supabase/AWS RDS
- Create feature branch from
develop - Write tests for new features
- Update TypeScript definitions
- Document API changes
- Submit PR with Linter checks passing
- Type Safety: Strict TypeScript enforcement
- Formatting: Prettier with project settings
- Testing: 80% coverage minimum
- Documentation: JSDoc for complex functions
PRs welcome! Please follow existing code patterns and add tests for new features.




