Cline rules
.clinerules/common_tasks.mdCline rules
Quality
82/100
Scores the file, not the repository.Length
600 words
42 headings · 25 code blocksRepository
0
— · pushed 25 days agoLast changed
2 days ago
First indexed 2 days ago.1# Common Tasks23## Docker Commands45### Start Development Environment6```bash7./run_dev.sh8```910### Start Production Environment11```bash12./run_prod.sh13```14> ⚠️ **Always use `./run_prod.sh` for production deploys** — it automatically backs up the database before restarting.1516### On-demand Backup17```bash18./backup.sh dev # Backup dev database now19./backup.sh prod # Backup prod database now20```2122### Restore from Backup23```bash24./restore.sh dev # List available dev backups25./restore.sh prod # List available prod backups26./restore.sh dev backups/dev_20260226_090000.sql # Restore specific backup27./restore.sh prod backups/prod_20260226_090000.sql # Restore specific backup28```2930### Stop Development Environment31```bash32./stop_dev.sh33```3435### Stop Production Environment36```bash37./stop_prod.sh38```39> ℹ️ `./stop_prod.sh` automatically backs up the database before stopping.4041### ⚠️ DANGER — Volume Warning42**NEVER** run `docker compose down -v` or `docker compose down --volumes` — this **permanently deletes all database data**.4344The safe `down` command (no `-v`) is used inside all `run_*.sh` / `stop_*.sh` scripts.4546### View Logs47```bash48# All services49./logs_dev.sh5051# Specific service52docker logs sapi3d-backend -f53docker logs sapi3d-frontend -f54docker logs sapi3d-db -f55```5657### Access Database58```bash59docker exec -it sapi3d-db psql -U sapi3d -d sapi3d60```6162### Restart Specific Service63```bash64docker restart sapi3d-backend65docker restart sapi3d-frontend66```6768## Database Backups6970Backups are saved to the `backups/` directory as `dev_TIMESTAMP.sql` or `prod_TIMESTAMP.sql`.7172Automatic backups happen on every `run_*.sh` and `stop_*.sh` call.7374### On-demand Backup75```bash76./backup.sh dev # Backup dev database now77./backup.sh prod # Backup prod database now78```7980### Restore from Backup81```bash82./restore.sh dev # List available dev backups83./restore.sh prod # List available prod backups84./restore.sh dev backups/dev_20260226_090000.sql # Restore specific backup85./restore.sh prod backups/prod_20260226_090000.sql # Restore specific backup86```8788> ℹ️ The `backups/` folder is in `.gitignore` — SQL dumps are not committed to the repo.8990## Development Workflows9192### Adding a New API Endpoint93941. **Create/Edit Router** (`backend/app/api/routers/`)952. **Create/Edit Service** (`backend/app/services/`)963. **Create/Edit Repository** (`backend/app/repositories/`)974. **Register Router** in `backend/app/main.py`985. **Rebuild & Test**:99```bash100 ./run_dev.sh101```1026. **Test in Swagger**: http://localhost:8000/docs103104### Adding a New Database Table1051061. **Create Model** (`backend/app/models/`)1072. **Create Schema** (`backend/app/schemas/`)1083. **Create Repository** (`backend/app/repositories/`)1094. **Rebuild Backend**:110```bash111 ./run_dev.sh112```1135. **Verify Table**:114```bash115 docker exec -it sapi3d-db psql -U sapi3d -d sapi3d -c "\dt"116```117118### Adding a New React Component1191201. **Create Component** (`frontend/src/components/`)1212. **Import in Parent** (e.g., `App.jsx`)1223. **Rebuild Frontend**:123```bash124 ./run_dev.sh125```1264. **Test**: http://localhost:3000127128## Testing129130### Run Backend Tests131```bash132cd backend133./run_test.sh134```135136### Manual API Testing137- **Swagger UI**: http://localhost:8000/docs138- **ReDoc**: http://localhost:8000/redoc139- **Curl Examples**: See `backend-curls.md`140141## Debugging142143### Check Container Status144```bash145docker ps146```147148### Check Container Logs149```bash150docker logs sapi3d-backend --tail 100151docker logs sapi3d-frontend --tail 100152docker logs sapi3d-db --tail 100153```154155### Access Backend Container Shell156```bash157docker exec -it sapi3d-backend bash158```159160### Access Frontend Container Shell161```bash162docker exec -it sapi3d-frontend sh163```164165### Check Database Connection166```bash167docker exec -it sapi3d-db psql -U sapi3d -d sapi3d -c "SELECT version();"168```169170### View Database Tables171```bash172docker exec -it sapi3d-db psql -U sapi3d -d sapi3d -c "\dt"173```174175## Common Issues176177### Port Already in Use178```bash179# Find process using port180sudo lsof -i :8000181sudo lsof -i :3000182183# Kill process184kill -9 <PID>185```186187### Docker Build Cache Issues188```bash189# Clean rebuild (preserves database)190./run_dev.sh191```192193### Database Connection Issues194```bash195# Check database is running196docker ps | grep sapi3d-db197198# Check database logs199docker logs sapi3d-db200201# Restart database202docker restart sapi3d-db203```204205## Detailed Documentation206207→ Complete workflows: `docs/development-guide.md`208→ API testing: `docs/api-reference.md#testing-the-api`209→ Troubleshooting: `docs/development-guide.md#troubleshooting`210
Also in KiralyAlparCsaba/Sapi3D
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| KiralyAlparCsaba/Sapi3D.clinerules/api_patterns.md · 0 | Cline rules | teststyleapiui+1 | 52/100 | 2 days ago | |
| KiralyAlparCsaba/Sapi3D.clinerules/architecture.md · 0 | Cline rules | archdatabaseapiui+2 | 54/100 | 2 days ago | |
| KiralyAlparCsaba/Sapi3D.clinerules/database.md · 0 | Cline rules | archsecuritydatabaseperformance+1 | 62/100 | 2 days ago | |
| KiralyAlparCsaba/Sapi3D.clinerules/file_locations.md · 0 | Cline rules | archdatabaseapiui+1 | 58/100 | 2 days ago | |
| KiralyAlparCsaba/Sapi3D.clinerules/project_overview.md · 0 | Cline rules | archdatabasedocs | 48/100 | 2 days ago | |
| KiralyAlparCsaba/Sapi3D.clinerules/validation_rules.md · 0 | Cline rules | styletypesdatabaseapi+2 | 73/100 | 2 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bashdeban/fastmind.clinerules/.project-consistency-keeper2.md · 5 | Cline rules | setupbuildtestlint-format+11 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.clinerules · 31k | Cline rules | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| BryaanF/LiantPortfolio.clinerules/project-guidelines.md · 0 | Cline rules | buildstylearchgit+2 | 96/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/zotero-keeper.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/pubmed-search-mcp.clinerules/50-pubmed-project.md · 23 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| prabhakar267/paper-games.clinerules/git-commit-guidelines.md · 0 | Cline rules | lint-formatstylearchgit+3 | 93/100 | 2 days ago | |
| VaillerTeeter/HoshimiNest.clinerules/project-identity.md · 1 | Cline rules | setuparchtypesdo-not | 93/100 | yesterday |
