Skip to content

Commit bdd2d92

Browse files
committed
Refactor AGENTS.md files for improved project setup documentation
- Consolidated setup instructions into AGENTS.md for each component: extralit-server, extralit-frontend, and extralit SDK. - Updated installation and development commands for clarity and consistency. - Removed outdated CLAUDE.md files and streamlined content to focus on essential setup and usage information. - Enhanced architecture notes and prerequisites for better guidance on project dependencies.
1 parent dedd641 commit bdd2d92

4 files changed

Lines changed: 185 additions & 458 deletions

File tree

AGENTS.md

Lines changed: 49 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,70 @@
1-
# CLAUDE.md
1+
# AGENTS.md - Project Setup Instructions
22

3-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3+
## Component-Specific Setup
44

5-
## Architecture Overview
5+
Each component has its own AGENTS.md with setup details:
6+
- **extralit-server/AGENTS.md** - Backend server setup
7+
- **extralit-frontend/AGENTS.md** - Frontend UI setup
8+
- **extralit/AGENTS.md** - Python SDK setup
69

7-
Extralit is a multi-component system for scientific literature data extraction with human-in-the-loop workflows:
10+
## Prerequisites
811

9-
- **extralit-server/**: FastAPI backend server with PostgreSQL database, handles users, datasets, records, and API interactions
10-
- **extralit-frontend/**: Vue.js/Nuxt.js web UI for data visualization, annotation, and team collaboration
11-
- **extralit/**: Python SDK client library for programmatic interaction with the server
12-
- **Vector Database**: External Elasticsearch/OpenSearch for scalable vector similarity searches
12+
- Python 3.10+ (server) / 3.9+ (SDK)
13+
- Node.js 18+
14+
- Docker & Docker Compose (for full stack)
15+
- PDM (Python package manager)
1316

14-
## Development Commands
17+
## Quick Setup
1518

16-
### Server (extralit-server/)
1719
```bash
18-
cd extralit-server/
19-
pdm run server-dev # Start server with auto-reload + worker
20-
pdm run server # Start server only
21-
pdm run worker # Start background worker only
22-
pdm run migrate # Run database migrations
23-
pdm run test # Run tests
24-
pdm run test-cov # Run tests with coverage
25-
pdm run lint # Run ruff linting
20+
# Install PDM
21+
pip install pdm
22+
23+
# Setup all components
24+
cd extralit-server && pdm install -G test
25+
cd ../extralit && pdm install -e ".[dev]"
26+
cd ../extralit-frontend && npm install
27+
28+
# Run migrations
29+
cd extralit-server && pdm run migrate
30+
31+
# Start services (requires Docker)
32+
docker-compose up -d
2633
```
2734

28-
### Frontend (extralit-frontend/)
35+
## Development Workflow
36+
37+
### Running Services
2938
```bash
30-
cd extralit-frontend/
31-
npm run dev # Development server
32-
npm run build # Production build
33-
npm run test # Run Jest tests
34-
npm run test:watch # Run tests in watch mode
35-
npm run test:coverage # Run tests with coverage report
36-
npm run e2e # Run Playwright e2e tests (interactive UI)
37-
npm run e2e:silent # Run e2e tests in headless mode
38-
npm run e2e:report # Show Playwright test report
39-
npm run lint # ESLint check
40-
npm run lint:fix # Fix ESLint issues
41-
npm run format # Format with Prettier
42-
npm run format:check # Check formatting without modifying files
43-
npm run generate-icons # Generate icon components from SVG files
39+
cd extralit-server && pdm run server-dev # Server + worker
40+
cd extralit-frontend && npm run dev # Frontend
4441
```
4542

46-
### Client SDK (extralit/)
43+
### Testing
4744
```bash
48-
cd extralit/
49-
pdm run test # Run tests
50-
pdm run test-cov # Run tests with coverage
51-
pdm run lint # Run ruff linting
52-
pdm run all # Format, lint, and test
45+
cd extralit-server && pdm run test # Server tests
46+
cd extralit && pdm run test # SDK tests
47+
cd extralit-frontend && npm run test # Frontend tests
5348
```
5449

55-
## Key Development Notes
56-
57-
### Frontend Architecture
58-
- Transitioning from Vuex to Pinia (v1/ directory contains new architecture)
59-
- Uses domain-driven design with entities, use cases, and dependency injection
60-
- Component structure: base (stateless) → features (page-specific) → global (reusable)
50+
### Code Quality
51+
```bash
52+
pdm run lint # Python linting (ruff)
53+
npm run lint # Frontend linting (ESLint)
54+
npm run format # Frontend formatting (Prettier)
55+
```
6156

62-
### Backend Structure
63-
- FastAPI with SQLAlchemy ORM and Alembic migrations
64-
- Background job processing with Redis Queue (rq)
65-
- OAuth2 authentication with JWT tokens
66-
- Webhook system for external integrations
67-
- Document processing with OCR capabilities
57+
## Architecture Notes
6858

69-
### Database Management
70-
- Alembic handles all database schema changes
71-
- Use `pdm run revision` to create new migrations after model changes
72-
- Always run `pdm run migrate` before starting development
59+
- **extralit-server/**: FastAPI + PostgreSQL + Redis Queue
60+
- **extralit-frontend/**: Vue.js/Nuxt.js (Vuex → Pinia migration)
61+
- **extralit/**: Python SDK client
62+
- **Vector DB**: Elasticsearch/OpenSearch (separate service)
7363

74-
### Testing
75-
- Backend: pytest with async support, factory-boy for fixtures
76-
- Frontend: Jest for unit tests, Playwright for e2e
77-
- Python packages require Python 3.9+ (extralit) or 3.10+ (extralit-server)
78-
- Node.js 18+ required for frontend
79-
80-
### Container Environment
81-
- Docker Compose setup available for full stack development
82-
- Services: Elasticsearch, Redis, MinIO for file storage
83-
- See `.github/workflows/copilot-setup-steps.yml` for complete environment setup
84-
85-
### Linting Configuration
86-
- Python: Ruff with shared configuration across packages
87-
- Frontend: ESLint + Prettier with TypeScript support
88-
- Pre-commit hooks for code formatting and linting
64+
### Key Patterns
65+
- Backend: SQLAlchemy ORM, Alembic migrations, async pytest
66+
- Frontend: Domain-driven design, dependency injection
67+
- Database: Always use Alembic for schema changes
8968

9069
# Agent Instructions
9170

0 commit comments

Comments
 (0)