New search function et drag and drop clean
This commit is contained in:
25
notes/projets/backend/api-design.md
Normal file
25
notes/projets/backend/api-design.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "API Design"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "backend", "api"]
|
||||
---
|
||||
|
||||
# API Design
|
||||
|
||||
## Architecture REST
|
||||
|
||||
Notre API suit les principes REST avec les endpoints suivants:
|
||||
|
||||
- `GET /api/v1/notes` - Liste toutes les notes
|
||||
- `GET /api/v1/notes/{path}` - Récupère une note
|
||||
- `PUT /api/v1/notes/{path}` - Crée/met à jour une note
|
||||
- `DELETE /api/v1/notes/{path}` - Supprime une note
|
||||
|
||||
## Authentification
|
||||
|
||||
Pour l'instant, pas d'authentification. À implémenter avec JWT.
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
À considérer pour la production.
|
||||
26
notes/projets/backend/database-schema.md
Normal file
26
notes/projets/backend/database-schema.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "Database Schema"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "backend", "database"]
|
||||
---
|
||||
|
||||
# Database Schema
|
||||
|
||||
## Indexer
|
||||
|
||||
L'indexer maintient une structure en mémoire:
|
||||
|
||||
```go
|
||||
type Indexer struct {
|
||||
tags map[string][]string
|
||||
docs map[string]*Document
|
||||
mu sync.RWMutex
|
||||
}
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
- Indexation en O(n) au démarrage
|
||||
- Recherche en O(1) pour les tags
|
||||
- Re-indexation incrémentale avec fsnotify
|
||||
26
notes/projets/backend/deployment.md
Normal file
26
notes/projets/backend/deployment.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "Deployment Strategy"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "backend", "devops"]
|
||||
---
|
||||
|
||||
# Deployment Strategy
|
||||
|
||||
## Production
|
||||
|
||||
1. Compiler le binaire Go
|
||||
2. Copier les fichiers statiques
|
||||
3. Configurer nginx comme reverse proxy
|
||||
4. Systemd pour gérer le service
|
||||
|
||||
## Docker
|
||||
|
||||
À créer un Dockerfile pour faciliter le déploiement.
|
||||
|
||||
```dockerfile
|
||||
FROM golang:1.22 AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN go build -o server ./cmd/server
|
||||
```
|
||||
Reference in New Issue
Block a user