Getting Started
This guide takes you from zero to your first safe contribution in the 3AM project.
WARNING
This project is built for the Egyptian government initiative DEPI. It is a training/learning project and not a real commercial company product.
Install the required tools
Before cloning the project, install these tools on your machine.
- Git
- Bun
1.3+ - Node.js (used by some ecosystem tooling)
You can verify quickly:
git --version
bun --version
node --versionClone and run the project
Clone the repository, move into it, and install dependencies:
git clone https://github.com/Majoramari/3am-frontend.git
cd 3am-frontend
bun installStart local development server:
bun run devVite prints a local URL in the terminal (usually http://localhost:5173). Open it in your browser (I'm a Firefox guy, so Firefox is my default choice).
Run the baseline checks
Before you edit anything, run the same checks used in normal review flow:
bun test
bun run build
bun run docs:buildIf these pass, your environment is ready.
Understand startup flow first
A lot of confusion in this project comes from editing the right code in the wrong place. This is the startup chain you should remember:
src/main.tsloads global CSS and callsbootstrapApp().src/app/bootstrap.tsrunsstartApp()and then boot-loader teardown.src/app/start.tsmounts the navbar, creates router, intercepts internal links, and triggers lazy media scanning.
If routing, nav behavior, or startup rendering is broken, these files are the first place to inspect.
If you want deeper routing details, continue with Pages and Routing.
Know where to put your changes
When you work on a feature, use this rule-of-thumb map:
src/app/routes.ts for registering routes.
src/pages/* for route-level page views.
src/sections/* for page-specific sections.
src/components/* for reusable UI pieces.
src/lib/* for cross-cutting framework utilities and internal helpers.
src/styles/* for all styling work.
First contribution checklist
Keep each PR focused on one concern. If your work includes two concerns, split them into two PRs.
Run checks again before opening PR:
bun test
bun run build
bun run docs:buildIn the PR description, explain what changed, why it changed, and how you validated it.
What to read next
Guidelines for coding standards and safe lifecycle patterns.
Building Components for reusable component workflow with before/after examples.
Styles for where CSS should live and how to structure it.