Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codex/environments/environment.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
version = 1
name = "atlantis"

[setup]
script = "npm install"
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ yarn-error.log*
.env.test.local
.env.production.local
!.env.example
.env.bkp

# IDE and editor
.idea
Expand Down Expand Up @@ -66,11 +67,24 @@ vitest.config.*
# Development tools
.eslintrc*
.prettierrc*
.prettierignore
.editorconfig
tsconfig.tsbuildinfo
next-env.d.ts

# Prisma migrations history (schema.template.prisma is needed)
prisma/migrations

# Data directory (mounted at runtime)
data/


# Other
.github/
.codex/
screenshots/
data_new/
plan/
examples/
TODO.md
AGENTS.md
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ PRISMA_SKIP_AUTOPUSH=
# Falls back to in-memory cache if not set
# REDIS_URL=redis://localhost:6379

# Live sync transport
# Use socket (SSE) for static instances, polling for serverless deployments
# Accepted values: socket | polling
NEXT_PUBLIC_LIVE_SYNC_METHOD=socket
# Polling interval in milliseconds (used only when method=polling)
# Accepted values: 3000 | 5000 | 10000 | 30000
NEXT_PUBLIC_LIVE_SYNC_POLL_INTERVAL_MS=5000

# API Access
# Set to true to enable the /api/access endpoints and API docs integration
ENABLE_API_ACCESS=false
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ labels: bug
Clear summary of the issue.

**Steps to Reproduce**

1.
2.
3.
Expand Down
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## Summary

Describe the changes and motivation.

Fixes # (issue)

## Checklist

- [ ] Tested changes locally
- [ ] Updated documentation (if applicable)
- [ ] Follows project style
- [ ] Follows project style
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint and Formatting
permissions:
contents: read
on:
push:
branches: ['main', 'master']
pull_request:
branches: ['main', 'master']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Run Prettier formatting check
run: npx prettier --check .
13 changes: 12 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ Purpose: concise, high-signal defaults for this Next.js 16 + TypeScript + Tailwi
- Diagrams: Mermaid editor; persisted to Prisma SQLite or JSON backup.
- Notes: see `src/app/notes`, server layouts fetch data and render client shells.
- Icons/Fonts/Themes: lucide-react, `next/font`, `next-themes` (light/dark toggle).
- Code map: `plan/code-map.md` is the required map-first index for file ownership and task routing.
- Editors: no Cursor rules (`.cursor/` missing); no Copilot instructions (`.github/copilot-instructions.md` missing). This file is authoritative.

## Mandatory Code Map Workflow

- Always read `plan/code-map.md` before searching or editing code.
- Use map-first navigation: start with the intent map and open those files before broad searching.
- Avoid blind repo-wide searches unless the code map does not cover the task.
- If you add/move/rename files, routes, folders, or exported functions, update `plan/code-map.md` in the same change.
- Treat stale code-map entries as bugs; fix them as part of the task.

## Commands (npm)

- Install deps: `npm install` (first step before any command).
Expand All @@ -32,13 +41,14 @@ Purpose: concise, high-signal defaults for this Next.js 16 + TypeScript + Tailwi
## Project Map

- `src/app/`: routes/layout. `src/app/page.tsx` uses ISR 30s.
- `src/app/[id]/`: diagram editor (client-heavy); gate browser libs with mounted checks.
- `src/app/diagram/[id]/`: diagram editor (client-heavy); gate browser libs with mounted checks.
- `src/app/notes/`: notes layout + list; dynamic fetch with `getNotePage`; entry page shows empty-state; `[id]/page` loads note with `getNoteById` and renders `NoteWorkspace`; `dynamic = 'force-dynamic'` on layout and page to avoid caching.
- `src/app/api/`: API routes; keep server-only.
- `src/components/`: feature/layout components. Avoid touching `src/components/ui` unless fixing a shared UI bug.
- `src/lib/`: utilities, data access (`notes-data`), types, Zustand store.
- `data/`: SQLite db/backups; `public/`: static assets; `scripts/`: bootstrap + Prisma helpers (bootstrap must run before dev/build).
- `docs/`: repo docs; update this file and `docs/AI.md` if conventions change.
- `plan/`: planning docs; `plan/code-map.md` must stay current with structure and ownership.

## Styling

Expand Down Expand Up @@ -149,6 +159,7 @@ Purpose: concise, high-signal defaults for this Next.js 16 + TypeScript + Tailwi

- Docs live in `docs/`; see `docs/AI.md` for AI/agent usage guidance.
- Update this file when commands, tooling, or conventions change.
- Update `plan/code-map.md` whenever code structure, directory ownership, routes, or exported responsibilities change.

## Extension Checklist

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
container_name: atlantis
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
- '${PORT:-3000}:3000'
volumes:
# Persist diagram data - map to your preferred location
# Default: uses Docker named volume
Expand All @@ -23,7 +23,7 @@ services:
- DATABASE_URL=${DATABASE_URL:-}
# No REDIS_URL - uses in-memory caching
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/" ]
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:3000/']
interval: 30s
timeout: 10s
retries: 3
Expand Down
32 changes: 27 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ services:
atlantis:
image: strikead/atlantis:latest
container_name: atlantis
user: '1001:1001'
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
- '${PORT:-3000}:3000'
volumes:
# Persist diagram data - map to your preferred location
# Default: uses Docker named volume
Expand All @@ -19,11 +20,24 @@ services:
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
# Database connection (optional - uses SQLite if not set)
- DATABASE_URL=${DATABASE_URL:-}
# AI Configuration (OpenAI or Google AI Studio keys)
- AI_API_KEY=${AI_API_KEY:-}
# Live sync transport (socket or polling)
- NEXT_PUBLIC_LIVE_SYNC_METHOD=${NEXT_PUBLIC_LIVE_SYNC_METHOD:-socket}
- NEXT_PUBLIC_LIVE_SYNC_POLL_INTERVAL_MS=${NEXT_PUBLIC_LIVE_SYNC_POLL_INTERVAL_MS:-5000}
networks:
- atlantis-network
depends_on:
redis:
condition: service_healthy
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/" ]
test:
[
'CMD',
'node',
'-e',
"fetch('http://127.0.0.1:3000/').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))",
]
interval: 30s
timeout: 10s
retries: 3
Expand All @@ -34,16 +48,24 @@ services:
container_name: atlantis-redis
restart: unless-stopped
ports:
- "6379:6379"
- '6379:6379'
volumes:
- ${ATLANTIS_DATA_DIR:-atlantis_data}:/data
- atlantis_redis_data:/data
command: redis-server --appendonly yes
networks:
- atlantis-network
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 3

networks:
atlantis-network:
driver: bridge

volumes:
atlantis_data:
driver: local
atlantis_redis_data:
driver: local
2 changes: 1 addition & 1 deletion docs/AI.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Server endpoint: `POST /api/ai/assist` (requires valid CSRF token). UI handles C

2. **Providers**:
- **OpenAI**: Default. Model: `gpt-4o-mini`.
- **Gemini**: Model: `gemini-2.5-flash` (override with `GEMINI_MODEL`).
- **Gemini**: Model: `gemini-3.1-flash-lite-preview` (override with `GEMINI_MODEL`).
- **Auto-detect**: Chooses provider from key prefix (`sk-...` vs `AIza...`/`gsk_...`).

## Usage
Expand Down
3 changes: 2 additions & 1 deletion docs/CONTAINER_STARTUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ PORT=8080 ATLANTIS_DATA_DIR=./my-data docker compose up -d
| `PRISMA_AUTO_APPLY` | `true` (non-prod), `false` (prod) | Auto-runs `prisma db push` on server start to ensure schema exists. |
| `PRISMA_SKIP_AUTOPUSH` | `false` | Set to `true` to skip all db push/seed operations. |
| `ENABLE_API_ACCESS` | `false` | Set to `true` to enable the REST API and /docs. |
| `GEMINI_MODEL` | `gemini-2.5-flash` | Override default Gemini model when using Gemini provider. |
| `GEMINI_MODEL` | `gemini-3.1-flash-lite-preview` | Override default Gemini model when using Gemini provider. |
| `GEMINI_API_VERSION` | `v1` or `v1beta` | Gemini API version; auto-detects `v1beta` for preview models. |
| `ATLANTIS_DATA_DIR` | `./data` | Host bind mount for data when using provided compose files. |

## Versioning
Expand Down
Loading
Loading