Note: This is a personal project by Amin Momin and is not currently accepting public contributions.
This document provides information about the project structure and development guidelines for reference purposes.
- Node.js 18+
- MySQL 8.0+
- Git
- A Google Cloud Platform account (for testing)
-
Clone the Repository
git clone https://github.com/aminmomin2/emailcleaner.git cd emailcleaner -
Install Dependencies
npm install
-
Environment Configuration
cp env.example .env.local # Edit .env.local with your configuration -
Database Setup
# Create database mysql -u root -p -e "CREATE DATABASE emailcleaner;" # Run schema mysql -u root -p emailcleaner < src/app/api/model/schema.sql
-
Start Development Server
npm run dev
- TypeScript: Use strict TypeScript with proper type annotations
- ESLint: Follow the project's ESLint configuration
- Prettier: Use consistent formatting (configured in the project)
- Comments: Add JSDoc comments for all public functions and components
src/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ ai/ # AI-powered endpoints
β β βββ auth/ # Authentication routes
β β βββ lib/ # Core business logic
β βββ auth/ # Authentication pages
β βββ globals.css # Global styles
βββ components/ # Reusable UI components
βββ hooks/ # Custom React hooks
βββ types/ # TypeScript type definitions
- Files: Use kebab-case for file names
- Components: Use PascalCase for component names
- Functions: Use camelCase for function names
- Constants: Use UPPER_SNAKE_CASE for constants
- Types/Interfaces: Use PascalCase with descriptive names
- Create reusable, composable components
- Use TypeScript interfaces for props
- Add JSDoc comments for component documentation
- Implement proper error boundaries
- Use React.memo for performance optimization when needed
- Use RESTful conventions for API endpoints
- Implement proper error handling and status codes
- Add input validation for all endpoints
- Use TypeScript for request/response types
- Add comprehensive logging
# Lint code
npm run lint
# Type checking
npm run build
# Run tests (when implemented)
npm test- Write unit tests for utility functions
- Write integration tests for API endpoints
- Test error scenarios and edge cases
- Maintain good test coverage
- Use descriptive test names
feature/feature-name- New featuresbugfix/bug-description- Bug fixeshotfix/urgent-fix- Critical fixesdocs/documentation-update- Documentation changes
Use conventional commit format:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Test changeschore: Build/tooling changes
Examples:
feat(auth): add Google OAuth integration
fix(api): resolve email sync timeout issue
docs(readme): update installation instructions
-
Create Feature Branch
git checkout -b feature/your-feature-name
-
Make Changes
- Write your code
- Add tests if applicable
- Update documentation
-
Commit Changes
git add . git commit -m "feat(scope): description"
-
Push and Create PR
git push origin feature/your-feature-name
-
Pull Request Guidelines
- Use descriptive PR titles
- Fill out the PR template
- Link related issues
- Request reviews from maintainers
- Check existing issues for duplicates
- Test with the latest version
- Try to reproduce the issue
**Bug Description**
A clear description of the bug.
**Steps to Reproduce**
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior**
What should happen.
**Actual Behavior**
What actually happens.
**Environment**
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Firefox, Safari]
- Version: [e.g. 1.0.0]
**Additional Context**
Any other context about the problem.**Feature Description**
A clear description of the feature.
**Use Case**
Why this feature would be useful.
**Proposed Implementation**
How you think this could be implemented.
**Alternatives Considered**
Other solutions you've considered.
**Additional Context**
Any other context about the feature request.- Never commit sensitive data (API keys, passwords)
- Use environment variables for configuration
- Validate all user inputs
- Implement proper authentication and authorization
- Follow OWASP security guidelines
- Report security vulnerabilities privately
If you discover a security vulnerability, please:
- Do NOT create a public issue
- Email security@yourdomain.com
- Include detailed information about the vulnerability
- Allow time for assessment and response
- Keep documentation up to date
- Use clear, concise language
- Include code examples
- Add screenshots for UI changes
- Update README.md for significant changes
README.md- Project overview and setupCONTRIBUTING.md- This fileCHANGELOG.md- Version historydocs/- Additional documentation- JSDoc comments in code
This project was developed by Amin Momin as a personal portfolio project to demonstrate:
- Full-stack development skills with Next.js and TypeScript
- AI/ML integration with Google Gemini
- OAuth authentication and security best practices
- Modern web development techniques and architecture
- Database design and optimization
- UI/UX design with responsive interfaces
- Showcase technical skills and capabilities
- Demonstrate real-world application development
- Highlight modern development practices
- Provide a working example of AI-powered email management
- GitHub: @aminmomin2
- LinkedIn: Amin Momin
- Email: aminmomin2006@gmail.com
- Repository: EmailCleaner on GitHub
- Live Demo: Available upon request
- Documentation: Comprehensive setup and usage guides included
- Enhanced AI email analysis
- Bulk email operations
- Email templates and automation
- Advanced filtering options
- Mobile app development
- Calendar integration
- Team collaboration features
- Advanced analytics
- API for third-party integrations
This project is licensed under the MIT License - see the LICENSE file for details.
EmailCleaner - A personal portfolio project by Amin Momin showcasing modern web development and AI integration skills. π