How madhan-g-p/simple-user-crud works
Project type and purpose
• This is a full-stack web application.
• Front-end: React single-page application (SPA) with pages for Login, Signup, Dashboard, VerifyAuth.
• Back-end: Node.js + Express REST API, versioned under v1, with authentication and user management endpoints.
• Database: PostgreSQL, with schema and seed scripts under back-end/postgres_scripts.
File structure
Top-level:
• front-end/ – React app (public, src, package.json)
• back-end/ – Express server (app.js, Routes.js, v1 controllers, middlewares, utilities, DB connection)
• back-end/postgres_scripts/ – SQL schema backup and user data scripts
• .env – holds DB credentials
Back-end layering:
• Entry point: app.js → configures Express, loads middleware, mounts Routes.js
• Routes.js → routes incoming requests to versioned controllers under v1
• v1/… → controllers for Authentication and Users, each with SQL constants
• middlewares/ → Authentication_Authorization.js for JWT or token checks
• dbConnection/ → db.js exports a PostgreSQL client pool
• utilities/ → helperFunctions.js, validatorSchemas.js
README
• Describes how to set up the DB credentials, run the SQL schema, and test with default admin credentials.
Elements
• Clear labels: “React Front-end”, “Express Routes”, “Auth Middleware”, “User Controller”, “DB Connection”, “PostgreSQL”
Detailed breakdown for maximum clarity
• Middleware layer explicitly shown between Routes and Controllers
• Data access layer showing pooled DB connections and SQL scripts
• External notes: .env for configuration, package.json for dependencies