documentation

This commit is contained in:
Alexis Bruneteau 2025-05-05 19:58:42 +02:00
parent 42a2f89ae3
commit 53b1b9273d
13 changed files with 196 additions and 4 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

8
.idea/Hosting.iml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Hosting.iml" filepath="$PROJECT_DIR$/.idea/Hosting.iml" />
</modules>
</component>
</project>

20
.idea/php.xml generated Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="8.4" />
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

9
docs/docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
services:
mkdocs:
image: squidfunk/mkdocs-material
container_name: mkdocs
ports:
- "8000:8000"
volumes:
- .:/docs

8
docs/docs/index.md Normal file
View File

@ -0,0 +1,8 @@
# Welcome to My SaaS Docs
This is the homepage for your documentation.
## Features
- Clean design
- Fast loading
- Easy to write in Markdown

107
docs/docs/stack.md Normal file
View File

@ -0,0 +1,107 @@
# 🔧 Tech Stack Overview
This document outlines the technologies used in this SaaS project, categorized by their roles in the system architecture.
---
## 🧠 Planning & Documentation
- **MkDocs + Material**: For internal documentation
- **Miro / Excalidraw** *(optional)*: For architecture diagrams
- **Notion / Obsidian** *(optional)*: For research and planning notes
---
## 🏗️ Backend
- **Language/Framework**: Laravel (PHP)
- **API Style**: RESTful
- **Auth**: Laravel Sanctum or Laravel Passport
- **Job Queues**: Laravel Queues with Redis
- **Database**: MySQL
- **Storage**: Amazon S3 for file uploads
---
## 🎨 Frontend
- **Framework**: Angular
- **Routing**: Angular Router
- **State Management**: NgRx (optional)
- **Styling**: Tailwind CSS or Angular Material
- **Forms**: Angular Reactive Forms
---
## 🔐 Authentication & Authorization
- **User Auth**: Email/password, with support for OAuth (Google, GitHub)
- **Session Handling**: JWT or Laravel session-based
- **RBAC**: Role-based access control system
---
## 💳 Billing & Payments
- **Provider**: Stripe
- **Features**: Subscriptions, Trials, Webhooks
---
## 🧪 Testing
- **Unit Tests**: PHPUnit (Laravel), Jasmine/Karma (Angular)
- **E2E Testing**: Playwright
- **Linting/Formatting**: ESLint, Prettier, PHP CS Fixer
---
## 🏭 DevOps & Infrastructure
- **Containerization**: Docker (dev) + LXC (production under Proxmox)
- **Proxmox Server**: Dell R630 with LXC containers for isolation
- **CI/CD**: Gitea Actions
- **Monitoring/Logs**: Sentry, Logtail, or ELK stack
- **Email**: Postmark or Mailgun
---
## 🌐 Hosting / Deployment
- **Frontend**: Nginx serving Angular build in LXC
- **Backend**: Laravel in LXC container
- **Database**: MySQL (in LXC or Proxmox-hosted VM)
- **DNS / SSL**: Let's Encrypt
---
## 🔒 Security Practices
- HTTPS enforced
- Rate limiting on APIs
- Input validation & sanitization
- Content Security Policy (CSP)
- Regular dependency auditing
---
## 📁 Repo Structure
```
/
├── backend/ # Laravel app
├── frontend/ # Angular app
├── docs/ # MkDocs documentation
│ ├─── mkdocs.yml
│ ├─── docker-compose.yml
│ └──── docs/
│ ├─── index.md
│ └─── stack.md
└── mkdocs.yml
```
---
## 📌 Notes
- Proxmox LXC containers are ideal for resource efficiency and isolation.
- You can snapshot and backup containers easily via Proxmox UI or CLI.
- Ensure containers have proper firewall and AppArmor profiles.

15
docs/mkdocs.yml Normal file
View File

@ -0,0 +1,15 @@
site_name: My SaaS Docs
repo_url: https://gitea.vidoks.local/sortifal/Hosting
theme:
name: material
palette:
- scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode

View File

@ -107,5 +107,8 @@
}
}
}
},
"cli": {
"analytics": false
}
}

View File

@ -12632,7 +12632,6 @@
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
"integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==",
"dev": true,
"license": "MIT",
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 KiB

View File

@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { RouterLink } from '@angular/router';
import {NgOptimizedImage} from "@angular/common";
@Component({
selector: 'app-hero',
standalone: true,
imports: [RouterLink],
imports: [RouterLink, NgOptimizedImage],
template: `
<section class="grid gap-10 py-24 md:grid-cols-2">
<div class="place-self-center text-center md:text-left">
@ -26,9 +27,9 @@ import { RouterLink } from '@angular/router';
<figure
class="relative aspect-video w-full overflow-hidden rounded-xl shadow-lg">
<img
src="assets/demo-dashboard.png"
ngSrc="example_dashboard.png"
alt="Dashboard preview"
class="absolute inset-0 h-full w-full object-cover" />
class="absolute inset-0 h-full w-full object-cover" height="1024" width="1024"/>
</figure>
</section>
`,