mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 18:21:22 +02:00
chore: remove all NestJS backend references, replace with Hono/Bun
- Delete nestjs-backend.md guideline (replaced by hono-server.md) - Delete Dockerfile.nestjs-base and Dockerfile.nestjs templates - Delete stale BACKEND_ARCHITECTURE.md doc (NestJS-era, obsolete) - Update CLAUDE.md, GUIDELINES.md, authentication.md to Hono/Bun first - Update all app CLAUDE.md files: backend/ → server/, NestJS → Hono+Bun - Update all app package.json files: @*/backend → @*/server - Update docs: LOCAL_DEVELOPMENT, PORT_SCHEMA, ENVIRONMENT_VARIABLES, DATABASE_MIGRATIONS, MAC_MINI_SERVER, PROJECT_OVERVIEW - Update scripts: generate-env.mjs, setup-databases.sh, build-app.sh - Update CI/CD: cd-macmini.yml backend → server paths - Update Astro docs site: @chat/backend → @chat/server Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
708299b35e
commit
ab387b9b3d
43 changed files with 598 additions and 2398 deletions
|
|
@ -25,16 +25,16 @@ Each backend service has its own database and schema:
|
|||
|
||||
```bash
|
||||
# Push schema changes (development)
|
||||
pnpm --filter @chat/backend db:push
|
||||
pnpm --filter @chat/server db:push
|
||||
|
||||
# Generate migration files
|
||||
pnpm --filter @chat/backend db:generate
|
||||
pnpm --filter @chat/server db:generate
|
||||
|
||||
# Run migrations
|
||||
pnpm --filter @chat/backend db:migrate
|
||||
pnpm --filter @chat/server db:migrate
|
||||
|
||||
# Open Drizzle Studio (database GUI)
|
||||
pnpm --filter @chat/backend db:studio
|
||||
pnpm --filter @chat/server db:studio
|
||||
```
|
||||
|
||||
## Development Workflow
|
||||
|
|
@ -60,13 +60,13 @@ For local development, use `db:push` to quickly sync schema changes:
|
|||
2. **Push changes**
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend db:push
|
||||
pnpm --filter @chat/server db:push
|
||||
```
|
||||
|
||||
3. **Verify in Studio**
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend db:studio
|
||||
pnpm --filter @chat/server db:studio
|
||||
```
|
||||
</Steps>
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ For production, use proper migration files:
|
|||
1. **Generate migration**
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend db:generate
|
||||
pnpm --filter @chat/server db:generate
|
||||
```
|
||||
|
||||
This creates a timestamped SQL file in `drizzle/migrations/`.
|
||||
|
|
@ -99,7 +99,7 @@ For production, use proper migration files:
|
|||
3. **Run migration**
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend db:migrate
|
||||
pnpm --filter @chat/server db:migrate
|
||||
```
|
||||
</Steps>
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ export class UsersService {
|
|||
Schema not pushed:
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend db:push --force
|
||||
pnpm --filter @chat/server db:push --force
|
||||
```
|
||||
|
||||
### Migration conflicts
|
||||
|
|
@ -253,7 +253,7 @@ Reset and regenerate:
|
|||
rm -rf apps/chat/apps/backend/drizzle/migrations/*
|
||||
|
||||
# Regenerate
|
||||
pnpm --filter @chat/backend db:generate
|
||||
pnpm --filter @chat/server db:generate
|
||||
```
|
||||
|
||||
### Connection refused
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ If you see errors about missing tables/columns:
|
|||
|
||||
```bash
|
||||
# Push the latest schema
|
||||
pnpm --filter @chat/backend db:push --force
|
||||
pnpm --filter @chat/server db:push --force
|
||||
```
|
||||
|
||||
### Port already in use
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ Manacore uses Jest for backend testing and Vitest for frontend testing.
|
|||
pnpm test
|
||||
|
||||
# Run tests for specific project
|
||||
pnpm --filter @chat/backend test
|
||||
pnpm --filter @chat/server test
|
||||
|
||||
# Run tests in watch mode
|
||||
pnpm --filter @chat/backend test:watch
|
||||
pnpm --filter @chat/server test:watch
|
||||
|
||||
# Run with coverage
|
||||
pnpm --filter @chat/backend test:cov
|
||||
pnpm --filter @chat/server test:cov
|
||||
```
|
||||
|
||||
## Test Structure
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ Turborepo handles task orchestration with:
|
|||
|
||||
| Type | Pattern | Example |
|
||||
|------|---------|---------|
|
||||
| App package | `@{project}/{app}` | `@chat/backend` |
|
||||
| App package | `@{project}/{app}` | `@chat/server` |
|
||||
| Shared package | `@manacore/shared-{name}` | `@manacore/shared-auth` |
|
||||
| Service | `@mana-{name}/service` | `@mana-search/service` |
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ AI chat application supporting multiple language models including local (Ollama)
|
|||
|
||||
| Component | Technology | Port |
|
||||
|-----------|------------|------|
|
||||
| Backend | NestJS | 3002 |
|
||||
| Server | Hono/Bun | 3002 |
|
||||
| Web | SvelteKit | 5173 |
|
||||
| Mobile | Expo | - |
|
||||
| Landing | Astro | - |
|
||||
|
|
@ -27,7 +27,7 @@ AI chat application supporting multiple language models including local (Ollama)
|
|||
pnpm dev:chat:full
|
||||
|
||||
# Or individual components
|
||||
pnpm dev:chat:backend
|
||||
pnpm dev:chat:server
|
||||
pnpm dev:chat:web
|
||||
pnpm dev:chat:mobile
|
||||
```
|
||||
|
|
@ -36,8 +36,8 @@ pnpm dev:chat:mobile
|
|||
|
||||
```
|
||||
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
||||
│ Client │────>│ Backend │────>│ AI Models │
|
||||
│ (Web/Mobile)│ │ (NestJS) │ │ Ollama/API │
|
||||
│ Client │────>│ Server │────>│ AI Models │
|
||||
│ (Web/Mobile)│ │ (Hono/Bun) │ │ Ollama/API │
|
||||
└─────────────┘ └──────┬──────┘ └─────────────┘
|
||||
│
|
||||
▼
|
||||
|
|
@ -147,21 +147,21 @@ export const messages = pgTable('messages', {
|
|||
First time setup requires seeding AI models:
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend db:push
|
||||
pnpm --filter @chat/backend db:seed
|
||||
pnpm --filter @chat/server db:push
|
||||
pnpm --filter @chat/server db:seed
|
||||
```
|
||||
|
||||
### Run Tests
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend test
|
||||
pnpm --filter @chat/backend test:e2e
|
||||
pnpm --filter @chat/server test
|
||||
pnpm --filter @chat/server test:e2e
|
||||
```
|
||||
|
||||
### Open Database GUI
|
||||
|
||||
```bash
|
||||
pnpm --filter @chat/backend db:studio
|
||||
pnpm --filter @chat/server db:studio
|
||||
```
|
||||
|
||||
## Links
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue