How hectoragvalenzuela/plot-plaza-frontend works
Project Type and Purpose
• PlotPlaza is a web application built with Angular (v17) and Angular Universal for server-side rendering (SSR).
• It uses the Angular CLI toolchain to scaffold, build, test, and serve both client and server bundles.
• There's no separate “backend API” in this repo; instead, it uses a Node/Express server (server.ts) to deliver pre-rendered pages and static assets.
Main Components
a. Client-Side Angular Application
• Entry Point: src/main.ts
• Core Modules: src/app/app.module.ts, app-routing.module.ts
• Components: src/app/app.component.*
• Assets & Styles: src/assets/*, src/styles.css, src/index.html
b. Server-Side Rendering Layer
• Server Entry: server.ts (Express server setup)
• Server Module: src/app/app.module.server.ts
• Server Bootstrap: src/main.server.ts
c. Build & Deployment
• Angular CLI & Webpack (under the hood via angular.json)
• Output directories: dist/browser (client bundle), dist/server (server bundle)
d. Development Tooling
• Configuration: angular.json, tsconfig.json, tsconfig.app.json, tsconfig.spec.json
• Testing: Karma (unit), Protractor or similar (e2e)
Relationships and Data Flow
1. User’s Browser requests a URL.
2. Node/Express server.ts handles the incoming HTTP request.
3. Server uses the compiled server bundle (main.server.js) + app.module.server to render HTML.
4. Server sends fully rendered HTML + references to client JS/CSS (from dist/browser).
5. Browser bootstraps the client Angular app (main.ts + app.module.ts), hydrates the page, and takes over routing.
6. Static assets (images, styles) are served directly by the same Express server from /assets.
Highlighted Architectural Patterns
• Client-Server SSR Hybrid: separation of client module vs. server module.
• Angular Modular Design: NgModule for browser and a parallel NgModule for server.
• Express as the thin server layer for SSR and static hosting.