How cloudtechdevops/2nd10weeksofcloudops-main works
This is a React/Node.js/MySQL book-library application, accompanied by AWS and Kubernetes deployment configuration. The main workflow is browsing and filtering books, viewing details, and—after authentication—creating, editing, or deleting books. The API persists catalog and account data in MySQL and broadcasts book changes to connected clients. The README documents AWS deployment; infrastructure files are present, but their internal wiring was not sampled, so those relationships are left unspecified.
Main entry points: App.jsx App routing · index.js Express server · useBooks.js Book data hooks · main.tf AWS environment
Components 25
Web application
- App routing
client/src/App.jsx - Session state
client/src/context/AuthContext.jsx - Login and registration
client/src/pages/LoginPage.jsx - Library layout
client/src/components/Layout.jsx - Book discovery
client/src/pages/BooksPage.jsx - Book cards
client/src/components/BookCard.jsx - Book details
client/src/pages/BookDetailPage.jsx - Book editor
client/src/components/BookForm.jsx - Add and edit pages
client/src/pages/AddBookPage.jsx - Loading indicator
client/src/components/Spinner.jsx - Book data hooks
client/src/hooks/useBooks.js - HTTP and socket client
client/src/pages/config.js
Application API
- Express server
backend/index.js - Authentication routes
backend/src/routes/auth.js - Book routes
backend/src/routes/books.js - Token middleware
backend/src/middleware/auth.js - Live update broadcasts
backend/index.js
Persistence
- Database access
backend/src/db/pool.js - MySQL database
Deployment infrastructure
- AWS environment
ROOT-terraform/envs/main.tf - Network resources
ROOT-terraform/modules/networking/main.tf - Kubernetes cluster
ROOT-terraform/modules/eks/main.tf - Database resources
ROOT-terraform/modules/database/main.tf - Kubernetes workloads
kubernetes-files/backend-deployment.yaml
Other components
- Reader
Connections 34
- Reader → App routing: uses
client/src/App.jsx - App routing → Session state: checks session
client/src/App.jsx - App routing → Library layout: renders
client/src/App.jsx - App routing → Book discovery: routes to
client/src/App.jsx - App routing → Book details: routes to
client/src/App.jsx - App routing → Add and edit pages: guards routes
client/src/App.jsx - App routing → Login and registration: routes to
client/src/App.jsx - App routing → Loading indicator: shows
client/src/App.jsx - Login and registration → Session state: uses
client/src/pages/LoginPage.jsx - Session state → HTTP and socket client: calls auth API
client/src/context/AuthContext.jsx - Library layout → Session state: reads session
client/src/components/Layout.jsx - Book discovery → Book data hooks: loads catalog
client/src/pages/BooksPage.jsx - Book discovery → Book cards: renders
client/src/pages/BooksPage.jsx - Book details → Book data hooks: loads and deletes
client/src/pages/BookDetailPage.jsx - Add and edit pages → Book editor: renders
client/src/pages/AddBookPage.jsx - Add and edit pages → Book data hooks: submits changes
client/src/pages/AddBookPage.jsx - Book editor → Book data hooks: loads categories
client/src/components/BookForm.jsx - Book data hooks → HTTP and socket client: calls book API
client/src/hooks/useBooks.js - Book data hooks → HTTP and socket client: subscribes to updates
client/src/hooks/useBooks.js - HTTP and socket client → Express server: sends API requests
client/src/pages/config.js - Express server → Authentication routes: mounts routes
backend/index.js - Express server → Book routes: mounts routes
backend/index.js - Express server → Database access: checks connection
backend/index.js - Express server → Live update broadcasts: broadcasts mutations
backend/index.js - Authentication routes → Database access: queries accounts
backend/src/routes/auth.js - Authentication routes → Token middleware: protects profile route
backend/src/routes/auth.js - Book routes → Database access: queries books
backend/src/routes/books.js - Book routes → Token middleware: checks access
backend/src/routes/books.js - Database access → MySQL database: reads and writes
backend/src/db/pool.js - Express server → AWS environment: deployment documented
README.md - AWS environment → Network resources
- AWS environment → Kubernetes cluster
- AWS environment → Database resources
- Kubernetes cluster → Kubernetes workloads