How relic7663/productos-app_angular_jsonserver works
Project type and purpose
• This is an Angular full-stack application with server-side rendering (Angular Universal) plus a mock JSON API.
• The “src” directory is the Angular app, the root “server” folder holds db.json (mock data store), and “src/server.ts” & “src/main.server.ts” bootstrap the SSR/Express server.
File structure
• Top-level:
• .vscode, .editorconfig, tsconfig*, angular.json, package.json – IDE/config/build files.
• core/ – global interceptors, guards, etc.
• public/ – static assets for production.
• server/db.json – mock REST API data file.
• src/:
• app/ – Angular application modules, components, services.
– app.config.ts/app.config.server.ts – environment‐specific config.
– app.routes.ts/app.routes.server.ts – browser vs server routing definitions.
– productos/ – feature module handling CRUD of “Producto” (components: create/edit/list + service).
– interceptors in core/ for error handling on HTTP calls.
• main.ts – client entry point.
• main.server.ts – server-side rendering entry point.
• server.ts – Express server that hosts SSR bundle + may proxy API requests to JSON server.
README for additional insights
• Standard Angular CLI instructions are provided.
• No explicit SSR instructions, but file names indicate Angular Universal usage and a mock JSON API.
Elements
• Clear labels: “Client Browser”, “Angular SSR Server”, “JSON API Server”, “db.json”, “Productos Module”
• Page load flow (Client ↔ SSR Server)
• API calls flow (Angular App → JSON API Server → db.json)
Detailed capture of essential architectural elements
• SSR entry point (main.server.ts → server.ts)
• Client entry point (main.ts → app.module.ts)
• Core module (interceptors) vs feature module (productos)
• Configuration layering (app.config.ts vs app.config.server.ts) at the boundary between server and client.