How adityamakkar000/turnerfentondeca works
Main Components
• Client (Browser): Represents the user’s interaction layer that loads and displays the static assets (inside the public folder with CSS files) and interacts with the dynamic pages rendered by EJS templates (located in the views folder).
• Server (Node.js Application):
• Central application logic provided by app.js.
• Modules supporting functionality such as gmail.js for Google login procedures, token.js for session or token management, and send.js/nameTruncator.js for auxiliary tasks.
• The googleSetup files likely contain configuration or helper routines for handling Google OAuth.
• PDF Extraction Service (Python Subsystem):
• A separate component (within the pdfextractor folder) with Python scripts (app.py, pdfText.py) and precompiled cache (in __pycache__), which is potentially used for extracting or processing content from PDF documents.
• External Services:
• Google Authentication may be integrated into the system via OAuth – represented as an external dependency that interacts with the server.
• Optionally, any analytics/charting libraries used on the client side (to display the pie graph) might be noted if known from additional documentation.
Relationships and Interactions
• Client <-> Server: Users browse the DECA web application pages (landing, home, questions, etc.) that are rendered by EJS views. The interaction happens via HTTP requests that hit the Node.js server.
• Server <-> External (Google Auth): The server handles login and authentication by sending users to Google’s OAuth service (using the googleSetup configuration). Successful authentication returns tokens, which are managed by token.js.
• Server <-> PDF Extraction Service: If PDF processing is required for extracting questions or content, the server may call or integrate with the Python-based pdfextractor service. This could be an internal API call or an offline processing step.
• Client <-> Static Assets: The client receives CSS (and potentially client-side JavaScript, not shown but likely referred in overall asset management) from the public folder.
Architectural Patterns and Technologies
• MVC-like Structure: Although not a strict MVC framework, there’s a separation between “views” (EJS files), “controller logic” (in app.js and node modules handling routes and authentication), and “model” (likely interacting with sessions, tokens, or possibly a database that isn’t explicitly shown in the file tree).
• Middleware/Services: The use of separate modules (gmail.js, token.js, send.js) allows for clean separation of functionality.
• Microservice-like or Standalone Utility: The PDF extractor is implemented in Python, serving as a utility or microservice decoupled from the core Node.js application.