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
|
||||
```
|
||||
27
notes/projets/frontend/codemirror-integration.md
Normal file
27
notes/projets/frontend/codemirror-integration.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "CodeMirror Integration"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "frontend", "editor"]
|
||||
---
|
||||
|
||||
# CodeMirror 6 Integration
|
||||
|
||||
## Configuration
|
||||
|
||||
Nous utilisons CodeMirror 6 avec:
|
||||
- `@codemirror/lang-markdown` pour le Markdown
|
||||
- `@codemirror/theme-one-dark` pour le thème
|
||||
- `@codemirror/basic-setup` pour les fonctionnalités de base
|
||||
|
||||
## Slash Commands
|
||||
|
||||
Système de commandes rapides avec `/`:
|
||||
- /h1, /h2, /h3 - Titres
|
||||
- /date - Date actuelle
|
||||
- /table - Tableau
|
||||
- /code - Bloc de code
|
||||
|
||||
## Auto-save
|
||||
|
||||
Déclenché après 2 secondes d'inactivité.
|
||||
27
notes/projets/frontend/drag-and-drop.md
Normal file
27
notes/projets/frontend/drag-and-drop.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "Drag and Drop System"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "frontend", "ux"]
|
||||
---
|
||||
|
||||
# Drag and Drop System
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
- Déplacer fichiers entre dossiers
|
||||
- Déplacer dossiers entre dossiers
|
||||
- Zone de drop racine
|
||||
- Indicateur visuel de destination
|
||||
|
||||
## Implémentation
|
||||
|
||||
Utilise l'API HTML5 Drag & Drop:
|
||||
- `dragstart` / `dragend`
|
||||
- `dragover` / `dragleave`
|
||||
- `drop`
|
||||
|
||||
## Validations
|
||||
|
||||
- Impossible de déplacer un dossier dans lui-même
|
||||
- Impossible de déplacer la racine
|
||||
31
notes/projets/frontend/vite-build.md
Normal file
31
notes/projets/frontend/vite-build.md
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
title: "Vite Build Process"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "frontend", "build"]
|
||||
---
|
||||
|
||||
# Vite Build Process
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
frontend/
|
||||
├── src/
|
||||
│ ├── main.js
|
||||
│ ├── editor.js
|
||||
│ ├── file-tree.js
|
||||
│ └── ui.js
|
||||
├── vite.config.js
|
||||
└── package.json
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
`npm run build` génère:
|
||||
- `project-notes-frontend.es.js` (ES modules)
|
||||
- `project-notes-frontend.umd.js` (UMD)
|
||||
|
||||
## Watch Mode
|
||||
|
||||
`npm run build -- --watch` pour le dev.
|
||||
21
notes/projets/mobile/pwa.md
Normal file
21
notes/projets/mobile/pwa.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
title: "Progressive Web App"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "mobile", "pwa"]
|
||||
---
|
||||
|
||||
# PWA Features
|
||||
|
||||
## À implémenter
|
||||
|
||||
1. Service Worker
|
||||
2. Manifest.json
|
||||
3. Offline support
|
||||
4. Install prompt
|
||||
|
||||
## Avantages
|
||||
|
||||
- Fonctionne offline
|
||||
- Installable sur mobile
|
||||
- Notifications push possibles
|
||||
26
notes/projets/mobile/responsive-design.md
Normal file
26
notes/projets/mobile/responsive-design.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "Responsive Design"
|
||||
date: "10-11-2025"
|
||||
last_modified: "10-11-2025:19:21"
|
||||
tags: ["projet", "mobile", "css"]
|
||||
---
|
||||
|
||||
# Responsive Design
|
||||
|
||||
## Media Queries
|
||||
|
||||
```css
|
||||
@media (max-width: 768px) {
|
||||
/* Tablettes */
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
/* Smartphones */
|
||||
}
|
||||
```
|
||||
|
||||
## Mobile-First
|
||||
|
||||
- Sidebar masquée par défaut
|
||||
- Preview-only mode
|
||||
- Touch-friendly buttons
|
||||
Reference in New Issue
Block a user