🏛️ BEGENONE Monolith (Legacy)

Status: 💤 Deprecated — archived for reference and historical context.

This repository contains the original monolithic implementation of BEGENONE, a proof‑of‑concept social network designed around positive engagement and creator freedom. It represents the early codebase that evolved into today’s distributed microservices and micro‑frontends. Although it is no longer maintained, it demonstrates how the first version handled routing, page rendering, data modelling and authentication within a single Node.js application.

🎯 Purpose & Background

The monolithic architecture was built to validate the core ideas of BEGENONE before committing to a larger rebuild. It provided a unified codebase where the server, view templates and business logic lived together. Key features included:

  • User accounts and authentication – sign‑up, login, profile management and password resets handled through Express middleware and controllers.
  • Video and channel management – upload, list and delete videos; create and manage channels; control privacy settings and view counts.
  • Pug‑based views – server‑rendered pages built with Pug templates, providing fast page loads and straightforward HTML generation.
  • Email verification and notifications – sending verification links and notifications via the utils/email.js module.
  • Basic search and feed rendering – initial implementations for searching channels/videos and displaying a feed of content.

Because this version predates the move to microservices, it encapsulated all of these concerns within a single Node.js process and MongoDB database. It was ideal for rapid prototyping and demonstrating early user flows.

🏗️ Architecture Overview

At its peak, the monolithic design comprised the following components:

  • Server entry points – app.js and server.js set up the Express app, connect to MongoDB, configure middleware and start the HTTP server.
  • Controllers – located in the controllers/ directory, organised by domain (auth controllers, user controllers, channel controllers, comment controllers, pricing controllers, etc.). These files handle business logic and route callbacks.
  • Views – the views/ folder contains Pug templates, grouped into subfolders like main/ (login, signup, verifyEmail), settings/ (user and channel settings), and others. Layout files and partials reside here as well.
  • Public assets – CSS and JavaScript files served from public/, providing client‑side interactivity for pages like the upload screen, comments and video player.
  • Utilities and helpers – scripts under utils/ (e.g. appError.js, email.js) implement reusable helpers for error handling and email sending.
  • Data models – Mongoose schemas (if present) and other data logic originally lived in a models/ directory (note: some of these files may have moved or been refactored during the migration).

The repository also includes a Dockerfile for containerised deployment, configuration files like .prettierrc for code style, and various log files. All environment variables and sensitive credentials have been scrubbed from the history.

🔄 Transition to Microservices

As BEGENONE matured, the limitations of a single server became apparent. Front‑end interactivity needed a modern framework, and backend responsibilities grew too complex to scale within one process. This led to a complete refactor into:

  • React‑based micro‑frontends – each page or domain now runs as an independent React app, enabling faster UI updates and modular deployment.
  • Node.js microservices – distinct services for authentication, channels, users, comments and payments, communicating via an API gateway.
  • Distributed infrastructure – deployed on container orchestration (e.g. AWS ECS/Fargate) with MongoDB Atlas and other managed services for reliability and scaling.

This legacy repository remains available to document that evolution and serve as a learning resource. It shows the architectural decisions and code organisation that informed the current system.

📁 Repository Contents

Below is a high‑level overview of key folders and files you will find here:

Path Description
app.js, server.js Entry points that configure Express, connect to MongoDB and start the HTTP server.
controllers/ Business logic modules grouped by domain (auth, user, comment, channel, view, pricing, etc.).
views/ Pug templates used to render server‑side pages, organised into subfolders like main, settings, and channel.
public/ Static assets (CSS, JavaScript, images) served to the client. Includes files like public/css/style.css, public/js/index.js and template loaders.
utils/ Helper functions such as error handling (appError.js) and email sending (email.js).
Dockerfile Instructions for building and running the application in a container during development or deployment.
.prettierrc Code formatting rules for the project.

Security note: All .env and config.env files were purged from the Git history. No sensitive credentials remain in any commit.

⚠️ Disclaimer

This project is deprecated and archived for educational purposes. It is not suitable for production use without significant updates. It serves to illustrate the starting point of BEGENONE’s architecture and to provide context for the modern, microservice‑based implementation.

If you are interested in the current codebase or want to see how these features evolved, please refer to the React microfrontend and Node.js microservice repositories. Otherwise, feel free to explore this legacy monolith to understand its design choices and development history.


Author: Areesh Alam
Project: BEGENONE — A positive social network
Archived: 2025

Share this project:

Updates