This documentation contains a set of guidelines to help you during the contribution process for SentiLog AI. We are happy to welcome all the contributions from anyone willing to improve/add new features to this project. Thank you for helping out and remember, no contribution is too small.
Please note we have a code of conduct - please follow it in all your interactions with the project.
You can refer to the following articles on basics of Git and Github and also contact the Project Maintainers, in case you are stuck:
- Forking a Repo
- Cloning a Repo
- How to create a Pull Request
- Getting started with Git and GitHub
- Learn GitHub from Scratch
SentiLog-AI/
│
├── client/ # React frontend (Vite + Tailwind)
│ ├── public/ # Static assets
│ ├── src/ # Source files
│ │ ├── pages/ # JournalPage, NewsPage, Dashboard
│ │ ├── components/ # Reusable components (Navbar, SentimentCard, etc.)
│ │ ├── App.jsx # Main React component
│ │ └── main.jsx # React entry point
│ ├── package.json # Frontend dependencies
│ ├── vite.config.js # Vite configuration
│ └── tailwind.config.js # Tailwind CSS configuration
│
├── server/ # Node.js + Express backend
│ ├── controllers/ # Business logic controllers
│ ├── middleware/ # Custom middleware functions
│ ├── models/ # MongoDB schemas using Mongoose
│ ├── routes/ # API routes (journal.js, news.js)
│ ├── index.js # Express server entry point
│ ├── package.json # Backend dependencies
│ └── .env.example # Environment variables template
│
├── ml-api/ # Python Flask ML microservice
│ ├── app.py # Flask application entry point
│ ├── .env.example # ML API environment variables
│ └── requirements.txt # Python dependencies
│
├── .gitignore # Files to ignore in Git
├── package-lock.json # Root package lock file
├── package.json # Root package configuration
├── README.md # Project overview and setup
└── LICENSE # MIT License- Node.js (v16 or higher)
- Python (v3.8 or higher)
- MongoDB (local or cloud instance)
- Git
- Copy
.env.examplefiles in bothserver/andml-api/directories - Fill in your MongoDB URI and other required secrets
- Ensure all three services can communicate (default ports: React:5173, Express:5000, Flask:5001)
- Fork the Repository: Click on the "Fork" button on the top right of the repository page on GitHub to create your own copy.
- Clone the Repository:
git clone https://github.com/your-username/SentiLog-AI.git- Navigate to the Project Directory:
cd SentiLog-AI- Create a New Branch:
git checkout -b feature/your-feature-nameUse prefixes like feature/, fix/, docs/, or refactor/ for better organization.
- Set Up Your Development Environment:
Frontend Setup:
cd client
npm install
npm run devBackend Setup:
cd ../server
npm install
npm run devML API Setup:
cd ../ml-api
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python app.py- Make Your Changes:
- Frontend contributions: Work in the
client/directory - Backend contributions: Work in the
server/directory - ML/AI contributions: Work in the
ml-api/directory
- Frontend contributions: Work in the
- Test Your Changes:
- Ensure all services are running and communicating properly
- Test API endpoints using tools like Postman or curl
- Verify frontend functionality in the browser
- Stage and Commit Changes:
git add .
git commit -m "feat: add sentiment analysis for journal entries"Commit Message Convention:
- feat: for new features
- fix: for bug fixes
- docs: for documentation updates
- style: for code style changes
- refactor: for code refactoring
- test: for adding tests
9. Push Changes to GitHub:
git push origin feature/your-feature-name- Create a Pull Request:
- Go to your forked repository on GitHub
- Click "Compare & pull request"
- Use the format:
[Component]: Description(e.g.,[Frontend]: Add mood tracking dashboard) - Provide detailed description of changes and add screenshots if applicable
- Open GitHub Desktop: Launch GitHub Desktop and log in to your GitHub account.
- Clone the Repository: Use File > Clone Repository and select SentiLog-AI.
- Switch to the Correct Branch: Create a new branch for your feature using the branch dropdown.
- Make Changes: Work in your preferred code editor on the appropriate component (client/, server/, or ml-api/).
- Commit Changes: Stage your files and write a descriptive commit message following our convention.
- Push Changes: Click "Push origin" to push your branch to GitHub.
- Create a Pull Request: Follow the same PR creation process as described above.
- UI/UX improvements for journal and news pages
- Data visualization components for sentiment trends
- Responsive design enhancements
- New dashboard features and analytics
- API endpoint development and optimization
- Database schema improvements
- Authentication and authorization features
- Data aggregation and analytics endpoints
- Sentiment analysis model improvements
- Emotion detection capabilities
- News sentiment analysis enhancements
- Model performance optimization
- Documentation improvements
- Testing (unit, integration, end-to-end)
- Performance optimizations
- Security enhancements
- Self-review your code - Ensure clean, well-commented code
- Add proper descriptions - Explain what your code does and why
- Include comments - Especially in complex logic areas
- Add screenshots - For UI changes, include before/after images
- Update documentation - If you're adding new features or changing APIs
- Test thoroughly - Ensure your changes don't break existing functionality
- Follow coding standards - Maintain consistency with existing codebase
PR Title Format: [Component]: Brief description
- Examples:
[Frontend]: Add mood trend visualization,[ML-API]: Improve sentiment accuracy
- Check existing issues - Avoid duplicates by searching first
- Use issue templates - Follow the provided templates for bugs/features
- Provide detailed descriptions - Include steps to reproduce, expected behavior, screenshots
- Label appropriately - Use labels like
bug,enhancement,frontend,backend,ml-api - Wait for assignment - Don't start working until you're assigned to avoid conflicts
- Ask questions - If anything is unclear, comment on the issue
- Frontend: Follow React best practices, use functional components with hooks
- Backend: Use async/await, proper error handling, and follow RESTful conventions
- ML API: Follow PEP 8 for Python code style
- General: Use meaningful variable names and add comments for complex logic
- Write unit tests for new functions and components
- Ensure integration tests pass for API endpoints
- Test cross-browser compatibility for frontend changes
- Update README.md if adding new setup steps
- Document new API endpoints in appropriate files
- Add inline comments for complex algorithms or business logic
- Be respectful - Treat all contributors with respect and kindness
- Be inclusive - Welcome contributors of all skill levels
- Be collaborative - Help others and ask for help when needed
- Be patient - Code reviews take time; maintainers are volunteers
Project Admin: Vivek Prakash
- GitHub Issues: SentiLog-AI Issues
Quick Help Resources:
- Check the README.md for setup instructions
- Browse existing issues and PRs for similar problems
- Review the project structure section above
All contributors will be:
- Listed in our Contributors section
- Mentioned in release notes for significant contributions
- Eligible for contributor badges and recognition
- Part of our growing open-source community
We truly appreciate your time and effort to help improve SentiLog AI. Whether you're fixing a typo, adding a new feature, or improving our ML models, every contribution makes a difference.
Together, let's build the future of mood and news sentiment analysis! 🚀
Happy coding! ✨