How scriptedbyarun47/arun1x works
1. Overall shape
- This is a two-tier portfolio site: a static frontend in frontend/ and a Python FastAPI backend in backend/.
- The app is split across two hosts: Vercel for the frontend and Render for the backend, with MongoDB Atlas and Cloudinary as external services.
2. Frontend boundary
- frontend/index.html, app.js, and style.css form the public-facing site.
- The frontend is built with vanilla HTML/CSS/JavaScript, so the browser handles most presentation and interaction logic directly.
- From the README, the UI includes a terminal-style boot screen, portfolio sections, a writeup reader, a CTF tracker, and a contact form.
3. Backend boundary
- backend/main.py is the application entrypoint for a FastAPI service.
- This backend is the system’s server-side integration point for data retrieval and persistence.
- backend/admin.html suggests the backend also serves or supports an admin-facing management page.
4. Data layer
- The README explicitly names MongoDB Atlas as the database.
- The likely architectural role of MongoDB is to store portfolio content and user-submitted data such as writeups, challenge entries, and contact form submissions.
- This separates editable content from the static frontend code.
5. Media handling
- The README names Cloudinary as the image CDN.
- This means writeup content or portfolio content likely references externally hosted images rather than storing media in the app repository or database.
- The frontend is therefore a consumer of image URLs, not the owner of binary media storage.
6. Public content flow
- A typical flow is: browser loads the static frontend from Vercel, JavaScript fetches content from the FastAPI backend, and the backend reads that content from MongoDB Atlas.
- For writeups, the frontend likely renders text plus Cloudinary-hosted images sourced from backend-managed content.
- This keeps the public site fast and mostly static while still allowing dynamic content updates.
7. Contact and submission flow
- The contact form is a key write path from the browser into the backend.
- The backend is responsible for validating and persisting submissions, likely into MongoDB Atlas.
- Any follow-up processing, if present, would also live behind the FastAPI boundary rather than in the browser.
8. Admin/content-management flow
- The presence of admin.html and the README’s “Admin dashboard for content management” indicates a separate management surface.
- This admin area likely writes portfolio data into the same backend/database used by the public site.
- Architecturally, this is the private control plane for updating the public portfolio without redeploying the frontend.
9. Runtime and deployment
- The backend is designed to run under Uvicorn via FastAPI, with Procfile indicating Render-style process startup.
- The frontend is deployed as static assets, consistent with Vercel hosting.
- This is a clean separation between a serverless/static presentation layer and a dedicated API service.
10. Repository organization
- The repo is intentionally simple: one backend app, one frontend app, and no shared monorepo framework.
- There are no obvious subservices or worker processes in the tree, so the architecture is mostly single API + single static client + external services.
- README.md doubles as the system’s architecture summary and deployment guide.
11. What to draw in an architecture diagram
- Show end users accessing the frontend on Vercel.
- Show the frontend calling the FastAPI backend on Render.
- Show the backend connected to MongoDB Atlas for content/data and Cloudinary for images.
- Show a separate admin/content-management path into the same backend and data store.
12. Key architectural takeaway
- The repository is a content-driven portfolio platform where the browser is mostly presentation logic, FastAPI is the integration and persistence boundary, and MongoDB/Cloudinary provide the durable content and media backends.
Main entry points: main.py FastAPI app · index.html Home page · app.js Client app · admin.html Admin page
Components 12
Users
People interacting with the portfolio and admin surfaces
- Browser · Loads and uses the public site
- Admin · Manages portfolio content through the admin surface
Frontend
Static browser app deployed on Vercel
- Home page · Public entry page for the portfolio
frontend/index.html - Client app · Browser interaction and data fetching logic
frontend/app.js - Stylesheet · Visual presentation for the public site
frontend/style.css - Writeup page · Dedicated page for reading writeups and media
frontend/writeup.html
Backend
FastAPI service deployed on Render
- FastAPI app · Server-side integration and content endpoint
backend/main.py - Admin page · Private content-management surface
backend/admin.html - Render app · Backend runtime and process startup
backend/Procfile
External services
Managed data and media backends
- MongoDB Atlas · Stores portfolio content and submissions
- Cloudinary · Hosts externally referenced images
- Vercel · Hosts the public frontend
Connections 12
- Browser → Vercel: opens · User accesses the deployed static site
- Vercel → Home page: serves · Vercel delivers the public HTML entry point
- Home page → Client app: loads · The page boots the browser logic
- Home page → Stylesheet: applies · The page uses the shared styling
- Client app → FastAPI app: fetches content · Client script retrieves dynamic portfolio data
- Writeup page → FastAPI app: reads data · Writeup views are populated from backend content
- FastAPI app → MongoDB Atlas: reads/writes · Persistent portfolio data and submissions live in MongoDB Atlas
- FastAPI app → Cloudinary: references images · Content may include Cloudinary-hosted media URLs
- Admin → Admin page: uses · Admin manages content through the management page
- Admin page → FastAPI app: updates content · Admin actions go through the FastAPI boundary
- FastAPI app → Render app: runs on · Render starts the FastAPI service process
- Render app → FastAPI app: hosts · Backend runtime executes the application entrypoint