Thank you for your interest in contributing to Document Chat System! This guide will help you get started.
-
Fork and clone the repository
git clone https://github.com/your-username/document-chat-system.git cd document-chat-system -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local # Edit .env.local with your configuration -
Set up the database
npm run db:generate npm run db:push npm run db:seed
-
Start development server
npm run dev
src/
├── app/ # Next.js 14 App Router
│ ├── api/ # API routes
│ ├── documents/ # Document management
│ ├── chat/ # Chat interface
│ └── profile/ # User profiles
├── components/ # React components
│ ├── ui/ # Base UI components
│ ├── documents/ # Document components
│ ├── chat/ # Chat components
│ └── layout/ # Layout components
├── lib/ # Utilities and configs
├── hooks/ # Custom React hooks
├── types/ # TypeScript definitions
└── stores/ # State management
- Use TypeScript for all new code
- Add proper type definitions
- Use Zod for schema validation
- Include JSDoc comments for complex functions
- Use functional components with hooks
- Follow the existing component patterns
- Use Radix UI primitives when possible
- Ensure accessibility (a11y) compliance
- Add proper error handling
- Include request/response validation
- Add rate limiting where appropriate
- Document with JSDoc comments
- Use Prisma for database operations
- Follow the existing schema patterns
- Add proper indexes for performance
- Include data validation
- Write unit tests for utility functions
- Add integration tests for API routes
- Test components with React Testing Library
- Ensure accessibility compliance
npm test # Run unit tests
npm run test:coverage # Run with coverage-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the code style guidelines
- Add tests for new functionality
- Update documentation as needed
-
Commit your changes
git commit -m "feat: add amazing new feature" -
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Describe your changes clearly
- Reference any related issues
- Include screenshots for UI changes
Follow the Conventional Commits format:
feat:new featuresfix:bug fixesdocs:documentation changesstyle:formatting changesrefactor:code refactoringtest:adding testschore:maintenance tasks
- Improve documentation and examples
- Add more file format support
- Enhance AI provider integrations
- Performance optimizations
- Accessibility improvements
- Mobile app companion
- Additional export formats
- Advanced search features
- Team collaboration features
- Plugin system
- Themes and customization
- Analytics and reporting
- Advanced admin features
- API client libraries
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Discord: Join our community
Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.
By contributing to Document Chat System, you agree that your contributions will be licensed under the MIT License.