Added Documents Feature

This commit is contained in:
Eric Gullickson
2025-09-28 20:35:46 -05:00
parent 2e1b588270
commit 775a1ff69e
66 changed files with 5655 additions and 944 deletions

View File

@@ -5,6 +5,12 @@
### AI Context Efficiency
**CRITICAL**: All development practices and choices should be made taking into account the most context efficient interaction with another AI. Any AI should be able to understand this application with minimal prompting.
## Never Use Emojis
Maintain professional documentation standards without emoji usage.
## Mobile + Desktop Requirement
**ALL features MUST be implemented and tested on BOTH mobile and desktop.** This is a hard requirement that cannot be skipped. Every component, page, and feature needs responsive design and mobile-first considerations.
### Codebase Integrity Rules
- Justify every new file and folder as being needed for the final production application.
- Never make up things that aren't part of the actual project
@@ -29,9 +35,9 @@ make logs # Monitor for build/runtime errors
```
### 3. Docker-Tested Component Development (Production-only)
- All testing in containers: `make shell-frontend` for debugging
- No dev servers; production builds served by nginx
- Changes require rebuild to reflect in production containers
- Use local dev briefly to pinpoint bugs (hook ordering, missing navigation, Suspense fallback behavior)
- Validate all fixes in containers.
## Quality Standards
@@ -76,43 +82,12 @@ Leverage subagents aggressively for better results:
## AI Loading Context Strategies
### For AI Assistants: Instant Codebase Understanding
To efficiently understand and maintain this codebase, follow this exact sequence:
#### 1. Load Core Context (Required - 2 minutes)
```
Read these files in order:
1. .ai/context.json - Loading strategies and feature metadata
2. docs/README.md - Documentation navigation hub
```
#### 2. For Specific Tasks
**Working on Application Features**
- Load entire feature directory: `backend/src/features/[feature-name]/`
- Start with README.md for complete API and business rules
- Everything needed is in this single directory
- Remember: Features are modules within a single application service, not independent microservices
**Working on Platform Services**
- Load `docs/PLATFORM-SERVICES.md` for complete service architecture
- Hierarchical vehicle API patterns
- Service-to-service communication
- Platform service deployment and operations
**Cross-Service Work**
- Load platform service docs + consuming feature documentation
**Database Work**
- Application DB: Load `docs/DATABASE-SCHEMA.md` for app schema
- Platform Services: Load `docs/PLATFORM-SERVICES.md` for service schemas
**Testing Work**
- Load `docs/TESTING.md` for Docker-based testing workflow
- Only use docker containers for testing. Never install local tools if they do not exist already
- Frontend now uses Jest (like backend). `make test` runs backend + frontend tests
- Jest config file: `frontend/jest.config.ts` (TypeScript configuration)
- Only vehicles feature has implemented tests; other features have scaffolded test directories
Canonical sources only — avoid duplication:
- Loading strategy and metadata: `.ai/context.json`
- Documentation hub and links: `docs/README.md`
- Feature work: `backend/src/features/{feature}/README.md`
- Platform architecture: `docs/PLATFORM-SERVICES.md`
- Testing workflow: `docs/TESTING.md`
## Architecture Context for AI
@@ -129,29 +104,4 @@ Read these files in order:
- **User-Scoped Data**: All application data isolated by user_id
### Common AI Tasks
```bash
# Run all migrations (inside containers)
make migrate
# Run all tests (backend + frontend) inside containers
make test
# Run specific application feature tests (backend)
make shell-backend
npm test -- features/vehicles
# Run frontend tests only (inside disposable node container)
make test-frontend
# View logs (all services)
make logs
# Container shell access
make shell-backend # Application service
```
## Never Use Emojis
Maintain professional documentation standards without emoji usage.
## Mobile + Desktop Requirement
**ALL features MUST be implemented and tested on BOTH mobile and desktop.** This is a hard requirement that cannot be skipped. Every component, page, and feature needs responsive design and mobile-first considerations.
See `Makefile` for authoritative commands and `docs/README.md` for navigation.