How enaughton/course-app works
Course-app is a React course catalog backed by an Express API and SQLite. Visitors can browse course listings and details; users sign up and sign in, then create, update, or delete courses. The client routes requests through shared data/context code, while the API handles authentication and course/user operations against Sequelize models. A separate seed workflow initializes the database. Client-to-API wiring and several client components are inferred from the documented capabilities and tree; their source was not sampled.
Main entry points: App.js Routes and shell · Data.js API client · PrivateRoute.js Route protection · index.js Sequelize setup
Components 20
React client
- Routes and shell
client/src/App.js - Route protection
client/src/PrivateRoute.js - Auth context
client/src/Context.js - API client
client/src/Data.js - Course browsing
client/src/components/Courses.js - Course details
client/src/components/CourseDetail.js - Account flows
client/src/components/UserSignUp.js - Sign in and out
client/src/components/UserSignIn.js - Create course
client/src/components/CreateCourse.js - Update course
client/src/components/UpdateCourse.js - Delete course
client/src/components/DeleteCourse.js
Express API
- HTTP routes and auth
api/app.js
Persistence
- Sequelize setup
api/db/index.js - User model
api/db/models/user.js - Course model
api/db/models/course.js - SQLite database
Database seed
- Seed runner
api/seed/index.js - Seed initialization
api/seed/database.js - Seed SQL access
api/seed/context.js
Other components
- Visitor or user
Connections 26
- Visitor or user → Routes and shell: uses
- Routes and shell → Course browsing: routes to
- Routes and shell → Course details: routes to
- Routes and shell → Account flows: routes to
- Routes and shell → Sign in and out: routes to
- Routes and shell → Route protection: guards routes
- Route protection → Create course: permits
- Route protection → Update course: permits
- Route protection → Delete course: permits
- Routes and shell → Auth context: provides
- Course browsing → API client: requests courses
- Course details → API client: requests course
- Account flows → API client: submits account
- Sign in and out → Auth context: updates auth
- Create course → API client: submits course
- Update course → API client: updates course
- Delete course → API client: deletes course
- API client → HTTP routes and auth: sends requests
- HTTP routes and auth → User model: queries users
- HTTP routes and auth → Course model: queries courses
- Sequelize setup → User model: loads model
- Sequelize setup → Course model: loads model
- Sequelize setup → SQLite database: connects
- Seed runner → Seed initialization: initializes
- Seed initialization → Seed SQL access: runs SQL through
- Seed SQL access → SQLite database: reads and writes