mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 10:06:42 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
|
|
@ -3,13 +3,15 @@
|
|||
## ✅ Was wurde implementiert
|
||||
|
||||
### 1. Environment Separation
|
||||
|
||||
- **Development**: `http://localhost:8090` (lokal)
|
||||
- **Production**: `https://pb.ulo.ad` (Coolify)
|
||||
- Automatische Umgebungserkennung basierend auf `dev` Flag
|
||||
|
||||
### 2. Code-Änderungen
|
||||
|
||||
- ✅ `.env.development` - Lokale PocketBase URL
|
||||
- ✅ `.env.production` - Production PocketBase URL
|
||||
- ✅ `.env.production` - Production PocketBase URL
|
||||
- ✅ `src/lib/pocketbase.ts` - Dynamische URL-Auswahl
|
||||
- ✅ `src/routes/p/[username]/+page.server.ts` - Environment-basierte URL
|
||||
- ✅ `src/lib/scripts/update-links-collection.js` - Flexible URL
|
||||
|
|
@ -17,6 +19,7 @@
|
|||
- ✅ `src/hooks.server.ts` - CSP Headers für beide Umgebungen
|
||||
|
||||
### 3. Sicherheit
|
||||
|
||||
- Keine hardcoded Production URLs mehr
|
||||
- Vollständige Trennung von Dev/Prod Daten
|
||||
- Lokale Entwicklung ohne Internetverbindung möglich
|
||||
|
|
@ -36,19 +39,21 @@ cd backend
|
|||
|
||||
### 2. Admin Account erstellen
|
||||
|
||||
1. Öffne http://localhost:8090/_/
|
||||
1. Öffne http://localhost:8090/\_/
|
||||
2. Erstelle Admin Account (nur beim ersten Mal)
|
||||
3. Merke dir die Credentials
|
||||
|
||||
### 3. Schema importieren
|
||||
|
||||
**Option A: Manuell über UI**
|
||||
|
||||
1. Login als Admin
|
||||
2. Settings → Import/Export
|
||||
3. Load from JSON → `backend/pb_schema.json`
|
||||
4. Review → Confirm
|
||||
|
||||
**Option B: Automatisch (wenn Collections existieren)**
|
||||
|
||||
```bash
|
||||
# Schema ist bereits in backend/pb_migrations/
|
||||
cd backend
|
||||
|
|
@ -63,6 +68,7 @@ node scripts/seed-local-db.js
|
|||
```
|
||||
|
||||
Erstellt:
|
||||
|
||||
- 2 Test-User (test@localhost, demo@localhost)
|
||||
- 4 Test-Links (normal, protected, expired, limited)
|
||||
- Sample Click-Daten
|
||||
|
|
@ -80,21 +86,24 @@ npm run dev:all
|
|||
## 📝 Test-Credentials
|
||||
|
||||
### Users
|
||||
|
||||
```
|
||||
Email: test@localhost
|
||||
Password: test123456
|
||||
|
||||
Email: demo@localhost
|
||||
Email: demo@localhost
|
||||
Password: demo123456
|
||||
```
|
||||
|
||||
### Links
|
||||
|
||||
- `http://localhost:5173/test1` - Normaler Link
|
||||
- `http://localhost:5173/test2` - Mit Click-Limit (100)
|
||||
- `http://localhost:5173/protected` - Password: `secret123`
|
||||
- `http://localhost:5173/expired` - Abgelaufener Link
|
||||
|
||||
### Admin
|
||||
|
||||
```
|
||||
URL: http://localhost:8090/_/
|
||||
Email: [deine Admin Email]
|
||||
|
|
@ -104,6 +113,7 @@ Password: [dein Admin Password]
|
|||
## 🔍 Verification
|
||||
|
||||
### 1. Environment Check
|
||||
|
||||
```bash
|
||||
# In Browser Console sollte stehen:
|
||||
🔧 PocketBase URL: http://localhost:8090
|
||||
|
|
@ -112,12 +122,14 @@ Password: [dein Admin Password]
|
|||
```
|
||||
|
||||
### 2. API Health
|
||||
|
||||
```bash
|
||||
curl http://localhost:5173/health
|
||||
# sollte zeigen: "pocketbase": "running"
|
||||
```
|
||||
|
||||
### 3. Feature Tests
|
||||
|
||||
- [ ] User Registration
|
||||
- [ ] Login/Logout
|
||||
- [ ] Link erstellen
|
||||
|
|
@ -166,15 +178,15 @@ Falls Probleme: Admin UI → Settings → API Rules
|
|||
|
||||
## 📊 Development vs Production
|
||||
|
||||
| Aspekt | Development | Production |
|
||||
|--------|------------|------------|
|
||||
| Aspekt | Development | Production |
|
||||
| -------------- | --------------------- | ----------------- |
|
||||
| PocketBase URL | http://localhost:8090 | https://pb.ulo.ad |
|
||||
| Datenbank | Lokal (SQLite) | Cloud (Coolify) |
|
||||
| Auth | Test-Accounts | Echte User |
|
||||
| Stripe | Test-Keys | Live-Keys |
|
||||
| Redis | localhost:6379 | Coolify Redis |
|
||||
| SSL | Nein (HTTP) | Ja (HTTPS) |
|
||||
| CSP | Relaxed | Strict |
|
||||
| Datenbank | Lokal (SQLite) | Cloud (Coolify) |
|
||||
| Auth | Test-Accounts | Echte User |
|
||||
| Stripe | Test-Keys | Live-Keys |
|
||||
| Redis | localhost:6379 | Coolify Redis |
|
||||
| SSL | Nein (HTTP) | Ja (HTTPS) |
|
||||
| CSP | Relaxed | Strict |
|
||||
|
||||
## 🔄 Daten-Synchronisation
|
||||
|
||||
|
|
@ -212,6 +224,7 @@ cd backend && ./pocketbase serve
|
|||
## 🚢 Deployment
|
||||
|
||||
Beim Deployment nach Production:
|
||||
|
||||
1. Environment wird automatisch erkannt
|
||||
2. Production URLs werden verwendet
|
||||
3. Keine Code-Änderungen nötig!
|
||||
|
|
@ -230,4 +243,4 @@ npm run preview
|
|||
- [PocketBase Docs](https://pocketbase.io/docs/)
|
||||
- [Admin UI Guide](https://pocketbase.io/docs/admin-ui/)
|
||||
- [API Rules](https://pocketbase.io/docs/api-rules-and-filters/)
|
||||
- [Migrations](https://pocketbase.io/docs/migrations/)
|
||||
- [Migrations](https://pocketbase.io/docs/migrations/)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue