Skip to content

Commit 11e56d3

Browse files
author
mobby57
committed
Mise à jour complète backend Solia
1 parent 94e8505 commit 11e56d3

File tree

101 files changed

+7665
-832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+7665
-832
lines changed

backend/.eslintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": ["eslint:recommended", "prettier"],
3+
"plugins": ["import"],
4+
"parserOptions": {
5+
"ecmaVersion": "latest",
6+
"sourceType": "module"
7+
},
8+
"env": {
9+
"es2021": true,
10+
"node": true
11+
},
12+
"rules": {
13+
"no-unused-vars": "warn",
14+
"import/order": ["warn", { "alphabetize": { "order": "asc" } }]
15+
}
16+
}

backend/.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "all"
5+
}

backend/Product_Summary.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Solia IAAS Product Summary
2+
3+
## 1. Modules fondamentaux (V1)
4+
5+
### Objectif
6+
Créer une version fonctionnelle, sécurisée et évolutive avec les rôles suivants :
7+
- ONG / Association
8+
- Donateur
9+
- Auto-entrepreneur (recruteur)
10+
- Entreprise de fundraising
11+
- Entité centrale (admin national)
12+
13+
### Architecture des rôles et espaces
14+
15+
| Rôle | Accès principal | Business model | Particularités |
16+
| -------------------------- | ---------------------------------------- | -------------------------- | -------------------------------------- |
17+
| ONG | Espace ONG personnalisé | Abonnement mensuel | Voir ses campagnes, ses donateurs |
18+
| Donateur | Espace personnel avec historique | Gratuit | Suivi des dons, documents, reçu fiscal |
19+
| Auto-entrepreneur | Espace terrain (mobile/web) | Commission sur chaque don | Planning, rapport, synchronisation |
20+
| Entreprise fundraising | Interface partenaire avec statistiques | Paiement à la performance | Missions multiples, gestion d’équipe |
21+
| Entité centrale | Backoffice total + gestion contractuelle | Commission & orchestration | Gère les contrats, API, conformité |
22+
23+
## 2. Modules clés à développer pour la V1
24+
25+
- Authentification & Autorisation
26+
- Multi-tenant, JWT + RBAC, Invitations par rôle, KYC
27+
- Gestion des entités
28+
- Users, Organizations, Donations, Missions, Documents KYC
29+
- Planning & géolocalisation
30+
- Création de mission, Affectation, Pointage terrain
31+
- Paiement & SEPA
32+
- Stripe Connect, Mandat + signature, Répartition automatique
33+
- API publique
34+
- Auth OAuth 2, Endpoints documentés, Webhooks
35+
- Conformité & audit
36+
- Journal d’audit, Stockage consentements, Export RGPD
37+
38+
## 3. Scénarios Postman / API
39+
40+
- Flow ONG: signup, upload KYC, missions, donations
41+
- Flow Auto-entrepreneur: signup, missions today, daily report
42+
- Flow Donateur: donate, SEPA mandate, history, receipt
43+
- Flow Admin central: contracts, API integrations, audit logs
44+
45+
## 4. Roadmap produit simplifiée
46+
47+
| Version | Objectifs | Délais estimés |
48+
| ------- | --------------------------------------------------- | -------------- |
49+
| V1 | Auth, rôle, missions, dons, dashboard ONG & terrain | 4–6 semaines |
50+
| V2 | App mobile PWA, Stripe SEPA, module formation | 6–8 semaines |
51+
| V3 | API publique, Academy, moteur IA de matching | 8–10 semaines |
52+
| V4 | Interconnexions CRM, HelloAsso, SDK mobile | 10–12 semaines |
53+
54+
---
55+
56+
Ce document peut être utilisé pour présenter le produit aux partenaires et ONG.

backend/README_ROUTE_DEMO.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Solia IaaS Backend Route Demo Instructions
2+
3+
## Running the Backend
4+
5+
1. Ensure you have Node.js and npm installed.
6+
7+
2. Install dependencies:
8+
9+
```bash
10+
npm install
11+
```
12+
13+
3. Set up environment variables:
14+
15+
- Copy `.env` or `.env.example` to `.env` and configure database connection, JWT secret, and other variables.
16+
17+
4. Run database migrations and seed data (if applicable):
18+
19+
```bash
20+
npx prisma migrate deploy
21+
npx prisma db seed
22+
```
23+
24+
5. Start the backend server:
25+
26+
```bash
27+
npm run dev
28+
```
29+
30+
The backend server will start on `http://localhost:3000`.
31+
32+
## Accessing Swagger UI
33+
34+
- Open your browser and navigate to:
35+
36+
```
37+
http://localhost:3000/docs
38+
```
39+
40+
- This will display the Swagger UI with all documented API routes, schemas, and authentication methods.
41+
42+
- **Troubleshooting:** If you get a 404 Not Found error on `/docs`, please verify:
43+
- The dependencies `@fastify/swagger` and `@fastify/swagger-ui` are installed.
44+
- The backend server logs for any errors during startup.
45+
- The swagger plugin is properly registered in `src/index.ts`.
46+
- Restart the backend server after any changes.
47+
48+
## Running Tests
49+
50+
- To run route tests, use:
51+
52+
```bash
53+
npm run test
54+
```
55+
56+
- This will execute tests in `src/routes/__tests__/` including user and auth route tests.
57+
58+
## Using the Postman Collection
59+
60+
- Import the Postman collection file located at:
61+
62+
```
63+
solia/backend/solia-iaas-postman-collection.json
64+
```
65+
66+
- Use the environment variables defined in the collection for base URL, tokens, tenant IDs, and roles.
67+
68+
- Follow the API flows for ONG, Auto-entrepreneur, Donor, and Admin roles as defined in the collection.
69+
70+
---
71+
72+
For any questions or issues, please contact the Solia development team.
73+
- Import the Postman collection file located at:
74+
75+
npm install

0 commit comments

Comments
 (0)