In modern software development, there is a widespread ailment that experienced architects call the "heavy stack trap." Picture a classic situation: a startup or a large company's innovation lab decides to launch a complex digital product. Fifteen intricate scenarios are planned: digital profiles, royalty calculations, rental catalogs, sponsor integrations, and analytics.
How does such a project usually begin? The team sits down and spends three months setting up infrastructure: spinning up a Kubernetes cluster, configuring PostgreSQL, wiring up Prisma ORM, configuring Redux Toolkit, arguing over UI library choices, and debugging CI/CD pipelines. Six months pass, millions of rubles of budget are spent, and the end investor or client still can't click through a working prototype.
The developer of the sports ecosystem "Цифровой аватар спортсмена" (ЦАС) showed a radical engineering counterexample in a detailed post on Habr: a full-featured demo circuit of 14 independent modules written entirely in 3,000 lines of pure Vanilla JavaScript with no third-party npm dependencies, frameworks, or backend.
Architecture of 14 functional modules with no server
The project's main goal was instant validation of a complex product and economic model in front of sports federations and sponsors. Instead of pitching the architecture on PowerPoint slides, the author built an interactive sandbox where every business-logic claim is verified in a couple of clicks right in the browser.
The system covers the complete lifecycle of an athlete's digital asset:
- Avatar passport: status verification, athletic achievement history, anthropometric metrics.
- Coach's methodology core: formalizing proprietary training methodologies as exercise graphs.
- Sub-rental catalog and cascading royalty graph: renting methodologies out to other clubs with automatic payment splitting between coach, athlete, and club.
- AI coaching: simulating training plan adaptation based on fatigue parameters.
- Sponsor and federation portals: auditing targeted grant spending, contracts, and athlete registries.
All 14 modules open as a single SPA from a static USB flash drive or via GitHub Pages.
11 deliberate architectural and legal constraints
The secret behind the codebase's compactness isn't code-compression magic, but what the developer deliberately refused to include:
- No personal data (PII): the system contains no last names, passport details, or phone numbers. All entities operate on depersonalized IDs (
ath-01,meth-99). That completely removed 152-FZ and GDPR legal requirements at the prototyping stage. - No backend or databases: all state lives in the browser's RAM (
in-memory store) with the option to quickly reset or save a snapshot tolocalStorage. - No frameworks (React, Vue, Svelte): having no Virtual DOM, Babel, or hundreds of megabytes of
node_moduleskept the code transparent for end-to-end auditing. - Pure CSS Grid and Flexbox: skipping Tailwind and third-party UI kits eliminated the build step altogether.
Reactivity on native primitives: EventTarget and CustomEvent
How do you manage state across 14 screens without Redux or Pinia? The developer used the native browser EventTarget class, implementing a reactive Event Bus in literally thirty lines of code:
// core-store.js: minimalist reactive store with zero dependencies
class AthleteStore extends EventTarget {
constructor() {
super();
this.state = {
athlete: { id: 'ath-01', level: 'Pro', fatigue: 12 },
methodology: { id: 'meth-99', royaltyRate: 0.15, activeRentals: 4 },
wallet: { balance: 142000, currency: 'RUB' }
};
}
getState() {
return this.state;
}
dispatchAction(action, payload) {
switch (action) {
case 'RENT_METHODOLOGY':
this.state.methodology.activeRentals += 1;
this.state.wallet.balance += 25000 * (1 - this.state.methodology.royaltyRate);
break;
case 'UPDATE_FATIGUE':
this.state.athlete.fatigue = payload;
break;
}
// Notify subscribers via native CustomEvent
this.dispatchEvent(new CustomEvent('stateChanged', { detail: this.state }));
}
}
export const store = new AthleteStore();
UI components simply subscribe to the stateChanged event and update their DOM trees using native template literals:
// ui-renderer.js: reactive update of the royalty screen
import { store } from './core-store.js';
function renderRoyaltyDashboard() {
const container = document.getElementById('royalty-view');
const state = store.getState();
container.innerHTML = `
<div class="card">
<h3>Payout balance: ${state.wallet.balance.toLocaleString('ru-RU')} ₽</h3>
<p>Active methodology rentals: ${state.methodology.activeRentals}</p>
<button id="btn-rent" class="btn-primary">Simulate rental (+25,000 ₽)</button>
</div>
`;
container.querySelector('#btn-rent').addEventListener('click', () => {
store.dispatchAction('RENT_METHODOLOGY');
});
}
// Subscribe to the store event bus
store.addEventListener('stateChanged', renderRoyaltyDashboard);
In the context of contracts and declarative rules in web development, this approach brings us back to basics: the browser itself is a powerhouse platform that needs no extra layers for core tasks.
This approach is ideal for a startup's pre-seed stage, hackathons, business-model validation, and client demos. Once logic is validated in 3,000 lines of pure JS, rewriting it onto a production stack with microservices and Postgres takes weeks rather than months, because the domain model has already been stripped of illusions.
Engineering boundaries
Of course, it would be naive to launch such a prototype into real production with a million users. Browser memory is limited, data isn't protected from cache clearing, and real financial transactions demand strict DBMS ACID guarantees.
Yet as a tool for rapid hypothesis testing, the ЦАС case proves the main point: architectural discipline and the courage to say "no" to unnecessary libraries matter immeasurably more to a product's success than chasing trendy frameworks.
![Node.JS [ru]](/api/digests/it_development/daily/20261103/assets/sources/we-use-js.jpg?v=48cd5ad358700f0c21120b2eaed3b02fe73d85a4ba4dcc23792581461a871389)