How fxprima/applytracker works
Main Components
a. Client (Frontend) – Located under the "client" directory, this part is built in React. It comprises pages, routing components (e.g., ProtectedRoute for authenticated access), form components (for dynamic login, registration, and other interactions), and API communication through Axios (axiosConfig.js).
b. Server (Backend) – Found inside the "server" directory, the backend uses Node.js and Express. It includes:
• Configuration files (config/config.json) for environment-specific settings (i.e., database connection details).
• Middleware (AuthMiddleware.js) for handling JWT authentication.
• Models (Applications, Statuses, Users) for mapping database entities.
• Routes (Applications.js, Statuses.js, Users.js) providing RESTful endpoints.
d. Environment Configuration – Both the client and server use .env and .env.example files to set environment variables (e.g., JWT_SECRET, PORT).
Relationships and Interactions
a. The Client sends HTTP requests (using Axios) to the Server endpoints.
b. The Server processes these requests via Express routes. In tasks related to user actions (add/edit/delete applications), it enforces JWT-based authentication via middleware.
c. The Server interacts with the MySQL database through models (such as Applications.js, Statuses.js, and Users.js) to perform CRUD operations.
d. Configuration files and environment variables tie together the deployment and local development concerns.
Architectural Patterns
a. Separation of Concerns: The distinct separation between the client (user interface and client-side logic) and the server (business logic, data handling, authentication).
b. MVC-like Pattern on the Server: With separate directories for routes (controllers), models, and middleware.
c. API-Driven Communication: The client communicates with the server through well-defined RESTful APIs.
d. Security via JWT Authentication: The use of AuthMiddleware and JWT tokens to manage secure interactions.
Relevant Technologies and Frameworks
a. React for building a responsive and dynamic frontend.
b. Node.js and Express for the backend API.
c. MySQL for persistent data storage.
d. JWT for managing secure user authentication.
e. Axios for handling HTTP requests on the frontend.
Detailing Essential Architectural Elements
a. Don’t overcomplicate—the goal is to capture the clear separation and interaction flows.
b. Notes on how environment configurations (like .env files and config.json) are used during deployment and development.
c. Application’s security flow by highlighting how requests are filtered through AuthMiddleware with JWT verification before accessing sensitive routes or database operations.