How cjohnston079/odin-inventory-application works
Main Components
A. Frontend Layer:
• Views (EJS Templates)
• Public Assets (SASS/CSS, Client-side JavaScript)
• Form Handlers and Input Validation
B. Backend Layer:
• Express.js Application Server
• Controllers
• Models
• Routing Layer
C. Data Layer:
• PostgreSQL Database
• Database Pool
• Query Handlers
Component Relationships
[Client Browser] ←→ [Frontend Layer] ←→ [Backend Layer] ←→ [Data Layer]
Detailed Component Breakdown
Frontend Layer (Top):
• Authors
• Books
• Countries
• Decades
• Genres
• A Public Assets section showing:
• SASS/CSS Styles
• Client-side JavaScript
• Form Handlers
Backend Layer (Middle):
• Express.js Server (Central)
• Routes Container showing all routes:
• authorsRouter
• booksRouter
• countriesRouter
• decadesRouter
• genresRouter
• Controllers Container showing:
• authorsController
• booksController
• countriesController
• decadesController
• genresController
• Models Container showing:
• Author
• Book
• Genre
Data Layer (Bottom):
• PostgreSQL Database
• Database Pool
• Query Handlers Container showing:
• queryAuthors
• queryBooks
• queryCountries
• queryGenres
Additional Details
Specific elements:
• Database seeding flow
• Static asset handling
• Form validation flow
• Error handling paths
Notes for Implementation
• The MVC pattern implementation
• CRUD operations flow
• Form validation and handling
• Database interaction patterns
• Static asset serving
• Template rendering process
Remember to indicate the environment configuration requirements and database seeding process as auxiliary components that are crucial for the application setup but not part of the runtime architecture.