5.1 KiB
StoryCove Documentation
Welcome to the StoryCove documentation! This directory contains comprehensive documentation for the StoryCove application.
📚 Documentation Files
API Documentation
Complete REST API reference with detailed endpoint descriptions, request/response examples, authentication details, and error handling.
Contents:
- Authentication endpoints
- Story management (CRUD, search, images)
- Author management (profiles, avatars, URLs)
- Tag system (creation, autocomplete, statistics)
- Series management (organization, navigation)
- File upload/download (images, validation)
- Search and indexing (Typesense integration)
- Configuration endpoints
- Data Transfer Objects (DTOs)
- Error handling and status codes
Data Model Documentation
Detailed database schema documentation including entity relationships, constraints, indexes, and business rules.
Contents:
- Entity Relationship Diagram
- Detailed table specifications
- Field types and constraints
- Relationship mappings
- Performance considerations
- Backup and migration strategy
OpenAPI Specification
Machine-readable API specification in OpenAPI 3.0 format for API testing tools, code generation, and integration.
Usage:
- Import into Postman, Insomnia, or similar tools
- Generate client SDKs
- API documentation hosting (Swagger UI)
- Contract testing
🛠️ How to Use This Documentation
For Developers
- Start with the API Documentation for endpoint details
- Reference Data Model for database understanding
- Use OpenAPI spec for testing and integration
- See main README for setup instructions
For API Integration
- Review authentication flow in API docs
- Import OpenAPI spec into your API client
- Test endpoints using the provided examples
- Implement error handling based on documented responses
For Database Work
- Study Data Model for schema understanding
- Review relationship constraints and business rules
- Use entity diagrams for system architecture planning
- Follow migration guidelines for schema changes
For System Administration
- Reference main README for deployment instructions
- Use environment configuration examples
- Review backup strategies in Data Model
- Monitor API health using documented endpoints
🔗 External Resources
Related Documentation
- Main README: Project overview, setup, and deployment
- Technical Specification: Comprehensive technical specification
- Environment Files:
.env.example,.env.development,.env.production
Technology Documentation
- Spring Boot: Backend framework
- Next.js: Frontend framework
- PostgreSQL: Database system
- Typesense: Search engine
- Docker: Containerization
📝 Documentation Standards
API Documentation
- All endpoints documented with examples
- Request/response schemas included
- Error scenarios covered
- Authentication requirements specified
Code Examples
- JSON examples use realistic data
- UUIDs formatted correctly
- Timestamps in ISO 8601 format
- Error responses include helpful messages
Data Model
- All tables and relationships documented
- Constraints and validation rules specified
- Performance implications noted
- Migration considerations included
🤝 Contributing to Documentation
When updating the application:
- API Changes: Update API.md and openapi.yaml
- Database Changes: Update DATA_MODEL.md
- Feature Changes: Update main README features section
- Deployment Changes: Update environment configuration examples
Documentation Checklist
- API endpoints documented with examples
- Database schema changes reflected
- OpenAPI specification updated
- Error handling documented
- Authentication requirements specified
- Performance implications noted
- Migration steps documented
📋 Quick Reference
Base URLs
- Development:
http://localhost:6925/api - Production:
https://yourdomain.com/api
Authentication
- Method: JWT tokens via httpOnly cookies
- Login:
POST /api/auth/login - Token Expiry: 24 hours
Key Endpoints
- Stories:
/api/stories - Authors:
/api/authors - Tags:
/api/tags - Series:
/api/series - Search:
/api/stories/search - Files:
/api/files
Common Response Codes
- 200: Success
- 201: Created
- 400: Bad Request
- 401: Unauthorized
- 404: Not Found
- 500: Server Error
This documentation is maintained alongside the codebase to ensure accuracy and completeness. For questions or clarifications, please refer to the appropriate documentation file or create an issue in the project repository.