How alexhippo/full-stack-app-with-react-rest-api works
Main System Components
a) Client-Side (Frontend):
• React Application Layer
• Component Structure
• Context API for state management
• Authentication handling
• Route management
b) Server-Side (Backend):
• Express REST API
• Authentication middleware
• Database layer (SQLite with Sequelize ORM)
• Route handlers
[Client Tier] <-> [API Tier] <-> [Data Tier]
Detailed Component Breakdown
Frontend (Client Tier):
• User Components (SignIn, SignUp, SignOut)
• Course Components (Courses, CourseDetail, CreateCourse, UpdateCourse)
• Error Components (Forbidden, NotFound, UnhandledError)
• Context Provider for global state
• Private Routes for authentication
API Tier:
• Authentication Middleware
• Route Handlers (users.js, courses.js)
• Async Handler Middleware
• Error Handling
Data Tier:
• Sequelize Models (User, Course)
• Database Relations
• SQLite Database
Interaction Flows
• HTTP requests between Client and API (GET, POST, PUT, DELETE)
• Database queries between API and Data tier
• Authentication flow
• Protected route handling
Technical Details
Annotations for:
• Port numbers (3000 for client, 5000 for API)
• Authentication tokens
• Database connection
• Key dependencies