# Install backend dependencies
cd server
npm install
# Install frontend dependencies
cd ../client
npm install# Navigate to server directory
cd ../server
# Generate Prisma client
npx prisma generate
# Run migrations
npx prisma migrate deployCreate a .env file in the server directory with:
PORT=3000
JWT_SECRET=your-secret-key-change-this-in-production
Terminal 1 - Start Backend:
cd server
npm startTerminal 2 - Start Frontend:
cd client
npm start- Frontend: http://localhost:3001
- Backend API: http://localhost:3000
-
Register/Login:
- Open http://localhost:3001
- Click "Need an account? Register"
- Enter username and password
- Click Register, then Login
-
Add Shoes:
- Enter shoe name (e.g., "Air Jordan 1")
- Enter brand (e.g., "Nike")
- Click "Add Shoe"
-
Delete Shoes:
- Click the "Delete" button next to any shoe
- Backend server starts without errors
- Frontend React app starts without errors
- Database tables are created
- Can register a new user
- Can login with credentials
- Can add shoes
- Can view shoe list
- Can delete shoes
- Data persists after page refresh
Issue: "Cannot find module 'dotenv'"
- Solution: Run
npm installin the server directory
Issue: Database errors
- Solution: Run
npx prisma generateandnpx prisma migrate deploy
Issue: Port already in use
- Solution: Change PORT in server/.env file
Issue: Frontend cannot connect to backend
- Solution: Check that backend is running on port 3000
- Verify REACT_APP_API_URL in client/.env is set correctly
livecoding/
├── server/
│ ├── src/
│ │ ├── controllers/ # TypeScript request handlers
│ │ ├── routes/ # TypeScript Express routes
│ │ ├── services/ # TypeScript business logic
│ │ ├── middleware/ # TypeScript auth middleware
│ │ └── index.ts # Server entry point
│ ├── prisma/ # Database & migrations
│ ├── tsconfig.json # TypeScript configuration
│ └── package.json
├── client/
│ ├── src/
│ │ ├── components/ # TypeScript React components
│ │ ├── services/ # TypeScript API service
│ │ └── App.tsx # Main app
│ ├── tsconfig.json # TypeScript configuration
│ └── package.json
├── README.md # Full documentation
└── package.json # Root scripts
For the live coding session:
- Test that everything works locally
- Be ready to explain:
- Project structure and architecture
- How authentication works (JWT flow)
- API design decisions
- React component structure
- Database schema design
- Error handling approach
- Prepare to record the session showing:
- Project setup
- Running the application
- Adding/removing shoes
- Code walkthrough
- Technical summary