# 6D Address Somalia - Progressive Web App
## 1. Project Vision
The mission of this project is to build a high-performance, secure, and user-friendly Progressive Web App (PWA) that allows Somali citizens to generate, register, and manage their official 6D digital address. The application is designed to be mobile-first and eventually publishable to app stores.
## 2. Core Technologies & Architecture
This project uses a modern, cloud-native, serverless architecture.
* **Frontend:**
* **Framework:** Vanilla JavaScript (ES Modules). No frameworks like React, Vue, or Angular are used.
* **Mapping:** Google Maps JavaScript API.
* **Styling:** Plain CSS3 with a CSS Variable-based theme system (Light/Dark modes).
* **Deployment:** **Cloudflare Pages**, connected to the `main` branch of the GitHub repository for continuous deployment.
* **Backend:**
* **Framework:** Node.js with Express.
* **Architecture:** Deployed as a scalable web service.
* **Deployment:** **Render**, connected to the `main` branch of the GitHub repository for continuous deployment.
* **Database:**
* **Engine:** PostgreSQL with the PostGIS extension for geospatial queries.
* **Hosting:** **Supabase**.
* **Authentication:**
* **Provider:** Firebase Authentication (Phone/OTP only).
* **Strategy:** A hybrid model. The frontend uses the Firebase SDK for OTP verification. The resulting ID Token is sent to our custom backend on Render, which verifies it and issues its own internal session token (JWT).
## 3. Project Structure
The repository is a monorepo containing two distinct applications: the frontend and the backend.
```
/
├── backend/ # Node.js/Express backend server
│ ├── routes/
│ ├── middleware/
│ ├── .env.example # Example environment variables
│ └── index.js
├── public/ # All static frontend files for Cloudflare
│ ├── assets/
│ ├── css/
│ ├── js/
│ └── index.html
├── inject-env.js # Build script for the fro …