Docs: Add backend deployment constraints and monorepo structure
- Documented Docker/Kubernetes deployment requirements - Added homelab configuration (resource limits, ports) - Configured reverse proxy compatibility - Designed monorepo structure (backend/mobile/web/shared)
This commit is contained in:
parent
1e38fe3ace
commit
1cf927f527
3 changed files with 1232 additions and 79 deletions
213
README.md
213
README.md
|
|
@ -1,94 +1,149 @@
|
|||
# Normogen
|
||||
### /home/asoliver/desarrollo/normogen/README.md
|
||||
```markdown
|
||||
1: # Normogen
|
||||
2:
|
||||
3: ## Overview
|
||||
4:
|
||||
5: Normogen is a privacy-focused health data tracking and management platform. The name comes from Mapudungun, relating to Balanced Life.
|
||||
6:
|
||||
7: ## Vision
|
||||
8:
|
||||
9: To record as many variables related to health as possible, store them in a secure, private manner, to be used by you, not by corporations. From medication reminders to pattern analysis, Normogen puts you in control of your health data.
|
||||
10:
|
||||
11: ## Technology Stack
|
||||
12:
|
||||
13: ### Backend
|
||||
14: - **Framework**: Axum 0.7.x
|
||||
15: - **Runtime**: Tokio 1.x
|
||||
16: - **Middleware**: Tower, Tower-HTTP
|
||||
17: - **Database**: MongoDB (with zero-knowledge encryption)
|
||||
18: - **Language**: Rust
|
||||
19:
|
||||
20: ### Mobile (iOS + Android)
|
||||
21: - **Framework**: React Native 0.73+
|
||||
22: - **Language**: TypeScript
|
||||
23: - **State Management**: Redux Toolkit 2.x
|
||||
24: - **Data Fetching**: RTK Query 2.x
|
||||
25: - **Health Sensors**: react-native-health, react-native-google-fit
|
||||
26: - **Encryption**: react-native-quick-crypto
|
||||
27:
|
||||
28: ### Web
|
||||
29: - **Framework**: React 18+
|
||||
30: - **Language**: TypeScript
|
||||
31: - **State Management**: Redux Toolkit 2.x
|
||||
32: - **Data Fetching**: RTK Query 2.x
|
||||
33: - **Charts**: Recharts
|
||||
34:
|
||||
35: ### Deployment
|
||||
36: - Docker on Linux
|
||||
37:
|
||||
38: ## Platform Strategy
|
||||
39:
|
||||
40: **Primary: Mobile Apps** - Daily health tracking, sensor integration, QR scanning, push notifications
|
||||
41:
|
||||
42: **Secondary: Web Browser** - Extensive reporting, visualization, profile management
|
||||
43:
|
||||
44: ## Key Features
|
||||
45:
|
||||
46: - Zero-knowledge encryption
|
||||
47: - Multi-person profiles
|
||||
48: - Family structure management
|
||||
49: - Secure sharing with expiring links
|
||||
50: - Mobile apps with health sensor integration
|
||||
51: - Web interface for complex visualizations
|
||||
52:
|
||||
53: ## Security Model
|
||||
54:
|
||||
55: - Client-side encryption: Data encrypted before leaving device
|
||||
56: - Zero-knowledge: Server stores only encrypted data
|
||||
57: - Proton-style encryption: AES-256-GCM with PBKDF2 key derivation
|
||||
58: - Shareable links: Self-contained decryption keys in URLs
|
||||
59: - Privacy-first: No data selling, subscription-based revenue
|
||||
60:
|
||||
61: ## Documentation
|
||||
62:
|
||||
63: - [Introduction](./introduction.md) - Project vision and detailed feature specification
|
||||
64: - [Encryption Implementation Guide](./encryption.md) - Zero-knowledge encryption architecture
|
||||
65: - [Research](./thoughts/research/) - Technical research and planning documents
|
||||
66:
|
||||
67: ## Development Status
|
||||
68:
|
||||
69: Phase: Planning/Documentation
|
||||
70:
|
||||
71: ### Completed
|
||||
72: - Project vision and requirements
|
||||
73: - Security architecture design
|
||||
74: - Encryption implementation guide
|
||||
75: - Git repository initialization
|
||||
76: - **Rust framework selection: Axum**
|
||||
77: - **Mobile/Web framework selection: React Native + React**
|
||||
78: - **State management selection: Redux Toolkit 2.x**
|
||||
79:
|
||||
80: ### Next Steps
|
||||
81: - Authentication system design (JWT with recovery phrases)
|
||||
82: - Database schema design
|
||||
83: - Create proof-of-concept with Axum
|
||||
84: - Implement basic CRUD API
|
||||
85: - Build mobile apps with health sensor integration
|
||||
86: - Build web companion app
|
||||
87: - Add encryption layer
|
||||
88: - Implement sharing functionality
|
||||
89:
|
||||
90: ## Open Source
|
||||
91:
|
||||
92: Normogen is open-source. Both server and client code will be publicly available.
|
||||
93:
|
||||
94: Note: This project is currently in the planning phase. No implementation code has been written yet.
|
||||
```
|
||||
|
||||
## Overview
|
||||
|
||||
Normogen is a privacy-focused health data tracking and management platform. The name comes from Mapudungun, relating to Balanced Life.
|
||||
## Monorepo Structure
|
||||
|
||||
## Vision
|
||||
This is a **monorepo** containing backend, mobile, web, and shared code:
|
||||
|
||||
To record as many variables related to health as possible, store them in a secure, private manner, to be used by you, not by corporations. From medication reminders to pattern analysis, Normogen puts you in control of your health data.
|
||||
```
|
||||
normogen/
|
||||
├── backend/ # Rust backend (Axum + MongoDB)
|
||||
├── mobile/ # React Native (iOS + Android)
|
||||
├── web/ # React web app
|
||||
├── shared/ # Shared TypeScript code
|
||||
└── thoughts/ # Research & design docs
|
||||
```
|
||||
|
||||
## Technology Stack
|
||||
Each platform has its own `src/` directory to keep codebases separate while sharing common code through the `shared/` directory.
|
||||
|
||||
### Backend
|
||||
- **Framework**: Axum 0.7.x
|
||||
- **Runtime**: Tokio 1.x
|
||||
- **Middleware**: Tower, Tower-HTTP
|
||||
- **Database**: MongoDB (with zero-knowledge encryption)
|
||||
- **Language**: Rust
|
||||
## Repository Management
|
||||
|
||||
### Mobile (iOS + Android)
|
||||
- **Framework**: React Native 0.73+
|
||||
- **Language**: TypeScript
|
||||
- **State Management**: Redux Toolkit 2.x
|
||||
- **Data Fetching**: RTK Query 2.x
|
||||
- **Health Sensors**: react-native-health, react-native-google-fit
|
||||
- **Encryption**: react-native-quick-crypto
|
||||
- **Git Hosting**: Forgejo (self-hosted)
|
||||
- **CI/CD**: Forgejo Actions
|
||||
- **Branch Strategy**: `main`, `develop`, `feature/*`
|
||||
- **Deployment**: Docker Compose (homelab), Kubernetes (future)
|
||||
|
||||
### Web
|
||||
- **Framework**: React 18+
|
||||
- **Language**: TypeScript
|
||||
- **State Management**: Redux Toolkit 2.x
|
||||
- **Data Fetching**: RTK Query 2.x
|
||||
- **Charts**: Recharts
|
||||
## Deployment
|
||||
|
||||
### Deployment
|
||||
- Docker on Linux
|
||||
### Backend Deployment
|
||||
|
||||
## Platform Strategy
|
||||
```bash
|
||||
# Clone repository
|
||||
git clone <forgejo-url> normogen
|
||||
cd normogen/backend
|
||||
|
||||
**Primary: Mobile Apps** - Daily health tracking, sensor integration, QR scanning, push notifications
|
||||
# Setup configuration
|
||||
cp config/.env.example config/.env
|
||||
# Edit config/.env
|
||||
|
||||
**Secondary: Web Browser** - Extensive reporting, visualization, profile management
|
||||
# Build and run
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
|
||||
## Key Features
|
||||
# Check status
|
||||
curl http://localhost:6000/health
|
||||
```
|
||||
|
||||
- Zero-knowledge encryption
|
||||
- Multi-person profiles
|
||||
- Family structure management
|
||||
- Secure sharing with expiring links
|
||||
- Mobile apps with health sensor integration
|
||||
- Web interface for complex visualizations
|
||||
**Resource Limits** (Homelab):
|
||||
- CPU: 1000m (1 core)
|
||||
- Memory: 1000Mi (1GB RAM)
|
||||
|
||||
## Security Model
|
||||
|
||||
- Client-side encryption: Data encrypted before leaving device
|
||||
- Zero-knowledge: Server stores only encrypted data
|
||||
- Proton-style encryption: AES-256-GCM with PBKDF2 key derivation
|
||||
- Shareable links: Self-contained decryption keys in URLs
|
||||
- Privacy-first: No data selling, subscription-based revenue
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Introduction](./introduction.md) - Project vision and detailed feature specification
|
||||
- [Encryption Implementation Guide](./encryption.md) - Zero-knowledge encryption architecture
|
||||
- [Research](./thoughts/research/) - Technical research and planning documents
|
||||
|
||||
## Development Status
|
||||
|
||||
Phase: Planning/Documentation
|
||||
|
||||
### Completed
|
||||
- Project vision and requirements
|
||||
- Security architecture design
|
||||
- Encryption implementation guide
|
||||
- Git repository initialization
|
||||
- **Rust framework selection: Axum**
|
||||
- **Mobile/Web framework selection: React Native + React**
|
||||
- **State management selection: Redux Toolkit 2.x**
|
||||
|
||||
### Next Steps
|
||||
- Authentication system design (JWT with recovery phrases)
|
||||
- Database schema design
|
||||
- Create proof-of-concept with Axum
|
||||
- Implement basic CRUD API
|
||||
- Build mobile apps with health sensor integration
|
||||
- Build web companion app
|
||||
- Add encryption layer
|
||||
- Implement sharing functionality
|
||||
|
||||
## Open Source
|
||||
|
||||
Normogen is open-source. Both server and client code will be publicly available.
|
||||
|
||||
Note: This project is currently in the planning phase. No implementation code has been written yet.
|
||||
**Ports**:
|
||||
- Backend API: `6000` (host) → `8000` (container)
|
||||
- MongoDB: `27017` (standard port)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue