chore: establish travel planner pnpm workspace
This commit is contained in:
12
.editorconfig
Normal file
12
.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
15
.env.example
Normal file
15
.env.example
Normal file
@@ -0,0 +1,15 @@
|
||||
APP_HTTPS_PORT=443
|
||||
IMAGE_TAG=local
|
||||
REGISTRY=local
|
||||
POSTGRES_IMAGE_TAG=18.4-alpine
|
||||
REDIS_IMAGE_TAG=8.8.1-alpine
|
||||
POSTGRES_DB=travel_planner
|
||||
POSTGRES_USER=travel_planner
|
||||
POSTGRES_PASSWORD=change-me-outside-source-control
|
||||
DATABASE_URL=postgresql://travel_planner:change-me-outside-source-control@postgres:5432/travel_planner
|
||||
REDIS_URL=redis://redis:6379
|
||||
APP_VERSION=dev
|
||||
TEAMCITY_BUILD_NUMBER=local
|
||||
SOURCE_REVISION=local
|
||||
TLS_CERT_FILE=/etc/travel-planner/tls/tls.crt
|
||||
TLS_KEY_FILE=/etc/travel-planner/tls/tls.key
|
||||
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
node_modules/
|
||||
dist/
|
||||
.angular/
|
||||
coverage/
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
/data/
|
||||
*.log
|
||||
.DS_Store
|
||||
39
README.md
Normal file
39
README.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Travel Planner
|
||||
|
||||
Self-hosted, AI-assisted travel planner. Angular PWA frontend, NestJS API + background worker, PostgreSQL, Redis/BullMQ, and a Mistral-backed travel agent behind a strict tool boundary.
|
||||
|
||||
> `.env.example` lists configuration **names and non-secret defaults only**. Real production secrets (database password, SMTP credentials, LLM API keys, etc.) are never committed and live only on the deployment host / secret store, supplied to containers as environment variables.
|
||||
|
||||
## Repository layout
|
||||
|
||||
```text
|
||||
frontend/ Angular PWA (pnpm workspace member)
|
||||
backend/ NestJS workspace: apps/api, apps/worker, libs/*
|
||||
docker/ Production Dockerfiles and edge (Nginx) config
|
||||
scripts/ Compose-invariant checks and TeamCity entry points
|
||||
docs/ Specs, plans, and architecture documentation
|
||||
```
|
||||
|
||||
## Developer setup
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev:infra
|
||||
DATABASE_URL=postgresql://travel_planner:travel_planner_dev@localhost:5432/travel_planner REDIS_URL=redis://localhost:6379 pnpm --filter backend start:api
|
||||
pnpm --filter frontend start
|
||||
```
|
||||
|
||||
`pnpm dev:infra` starts local PostgreSQL/Redis (see `compose.dev.yml`); `pnpm dev:infra:down` stops them.
|
||||
|
||||
## Quality gates
|
||||
|
||||
```bash
|
||||
pnpm lint
|
||||
pnpm test
|
||||
pnpm test:compose
|
||||
pnpm build
|
||||
```
|
||||
|
||||
## Production topology
|
||||
|
||||
Production Docker Compose (`compose.yml`) publishes **exactly one** host port, on the `edge` (Nginx) service, which serves the built Angular app and reverse-proxies `/api/*` and `/health/*` to the internal `api` service. `api`, `worker`, `postgres`, and `redis` are reachable only over the internal Docker network. See `docs/architecture/deployment.md` for the full contract and `scripts/teamcity/` for the TeamCity-invoked build/deploy/rollback scripts.
|
||||
10211
backend/package-lock.json
generated
10211
backend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
8690
frontend/package-lock.json
generated
8690
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,6 @@
|
||||
"test": "ng test"
|
||||
},
|
||||
"private": true,
|
||||
"packageManager": "npm@11.12.1",
|
||||
"dependencies": {
|
||||
"@angular/common": "^21.2.0",
|
||||
"@angular/compiler": "^21.2.0",
|
||||
|
||||
25
package.json
Normal file
25
package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "travel-planner",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.15.0",
|
||||
"engines": {
|
||||
"node": ">=24.15.0 <25"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "pnpm -r --if-present run lint",
|
||||
"test": "pnpm -r --if-present run test",
|
||||
"build": "pnpm -r --if-present run build",
|
||||
"dev:infra": "docker compose -f compose.dev.yml up -d --wait",
|
||||
"dev:infra:down": "docker compose -f compose.dev.yml down",
|
||||
"test:compose": "node --test tests/compose-invariants.test.mjs"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
"esbuild",
|
||||
"lmdb",
|
||||
"msgpackr-extract",
|
||||
"unrs-resolver"
|
||||
]
|
||||
}
|
||||
}
|
||||
9895
pnpm-lock.yaml
generated
Normal file
9895
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
3
pnpm-workspace.yaml
Normal file
3
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
- frontend
|
||||
- backend
|
||||
Reference in New Issue
Block a user