Welcome to React in 90-ish Minutes - a 90 minutes crash course on ReactJS, including explanatory slides, a YouTube video tutorial, and a hands-on tutorial where you'll learn React by building a real, full-stack application!
Watch the full workshop on YouTube:
Try the stackblitz examples directly in your browser:
You can also find the code for these examples in the stackblitz-examples directory in this repository.
By the end of this tutorial, you'll understand:
- ✅ React fundamentals (Components, JSX, Props)
- ✅ Routing with React Router
- ✅ State Management (
useState) - ✅ Side Effects (
useEffect) - ✅ Custom Hooks
- ✅ Context API for global state
- ✅ Performance optimization (
useMemo,useCallback) - ✅ React 19 Features (Suspense, Lazy Loading)
- ✅ Error Handling with Error Boundaries
PokAImon Generator - An AI-powered creature creator app with:
- 🎨 Canvas drawing interface
- 🤖 AI-generated creatures from your doodles
- 📸 Gallery with filtering and sorting
- ❤️ Like functionality
- 🌙 Dark mode toggle
- 🚀 Modern React patterns and best practices
react-in-90-tutorial/
├── client-tutorial/ # React app (Vite + Tailwind)
│ └── README.md # Step-by-step tutorial guide
├── slides/ # Presentation slides
├── server/ # Express API + Postgres
└── docker-compose.yml # Database setup
- Node.js 18+
- Docker (for database)
- Basic JavaScript knowledge
docker compose up -dThis starts a PostgreSQL database with the schema pre-configured.
Create environment files:
Backend (server/.env):
PORT=3001
DATABASE_URL=postgres://postgres:postgres@localhost:5432/pokegen
CORS_ORIGIN=http://localhost:5173
GEMINI_API_KEY=your_api_key_here # Optional: for AI featuresFrontend (client-tutorial/.env):
VITE_BACKEND_URL=http://localhost:3001cd server
npm install
npm startBackend runs at http://localhost:3001
cd client-tutorial
npm install
npm run devFrontend runs at http://localhost:5173
Open client-tutorial/README.md for the complete step-by-step tutorial guide. The tutorial walks you through building the entire app from scratch!
Theory + Concepts (45 min)
- React fundamentals
- Virtual DOM
- Hooks ecosystem
- Modern patterns
Hands-On Coding (45 min)
- Follow
client-tutorial/README.md - Build features incrementally
- Test as you go
Frontend
- React 19 (Vite)
- React Router
- Tailwind CSS
Backend
- Node.js + Express
- PostgreSQL 16
- Gemini AI (optional)
Base URL: http://localhost:3001
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/health |
Health check |
GET |
/api/gallery |
Get all PokAImon |
POST |
/api/generate |
Generate new PokAImon |
PATCH |
/api/pokaimon/:id/like |
Like a PokAImon |
curl -X POST http://localhost:3001/api/generate \
-H "Content-Type: application/json" \
-d '{"doodle_data": "<base64-encoded-image>"}'Response:
{
"id": 1,
"name": "Scribblet",
"type": "Fire/Dragon",
"characteristics": "Cheerful and imaginative",
"image_url": "data:image/png;base64,...",
"like_count": 0
}The app can generate AI-powered creatures using Google's Gemini API:
- Get an API key from Google AI Studio
- Add it to
server/.envasGEMINI_API_KEY - The app will use AI to generate unique creatures!
Without the API key, the app uses simulated placeholder generation.
Database connection issues?
- Ensure Docker is running:
docker compose ps - Reset database:
docker compose down -v && docker compose up -d
Port conflicts?
- Backend: Change
PORTinserver/.env - Frontend: Update
VITE_BACKEND_URLto match
CORS errors?
- Verify
CORS_ORIGINinserver/.envmatches your frontend URL
For educational and tutorial purposes.
Happy coding! 🎉 If you get stuck, check the client-tutorial/README.md for detailed instructions on each step.
