Thank you for your interest in contributing to BrainsMath! This guide will help you understand the project structure and how to contribute effectively.
- Project Overview
- Tech Stack
- Getting Started
- Project Structure
- Development Guidelines
- Code Style
- Pull Request Process
- Feature Development
- Bug Reports
- Documentation
BrainsMath is a modern web application built with Next.js that helps users practice and improve their mental math skills. The application features:
- Multiple math operation types (addition, subtraction, multiplication, roots, squares)
- Different difficulty levels
- User authentication
- Progress tracking
- Customizable themes
- Frontend Framework: Next.js 14
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: React Context
- Authentication: Custom implementation
- Deployment: Netlify
-
Fork the repository
-
Clone your fork
git clone https://github.com/OM3X4/Brainsmath-2.0.git cd brainsmath2.0 -
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser and navigate to
http://localhost:3000
app/
├── Components/ # Reusable UI components
├── context/ # React context providers
├── utils/ # Utility functions
├── types/ # TypeScript type definitions
├── authentication/ # Authentication related pages
├── profile/ # User profile pages
├── settings/ # Application settings
├── globals.css # Global styles
└── page.tsx # Main application page
- Use TypeScript for all new code
- Follow the existing code style and patterns
- Use meaningful variable and function names
- Add appropriate comments for complex logic
- Keep components small and focused
- Create components in the
app/Componentsdirectory - Use functional components with hooks
- Implement proper TypeScript types
- Follow the existing styling patterns using Tailwind CSS
- Use React Context for global state
- Keep component state local when possible
- Follow the existing context patterns
- Write tests for new features
- Ensure existing tests pass
- Test across different screen sizes
-
Create a new branch for your feature/fix
git checkout -b feature/your-feature-name
-
Make your changes and commit them
git commit -m "Description of your changes" -
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Provide a clear description of your changes
- Reference any related issues
- Include screenshots for UI changes
- Update types in
app/types/types.ts - Add generation logic in
app/utils/questionGen.ts - Update UI components to support the new operation
- Add appropriate tests
- Add new theme variables in
app/globals.css - Update theme selection components
- Test across different components
- Follow the existing authentication patterns
- Implement proper security measures
- Handle edge cases appropriately
When reporting bugs:
- Use the issue template
- Provide steps to reproduce
- Include expected vs actual behavior
- Add relevant screenshots
- Specify your environment details
- Keep documentation up to date
- Add comments for complex logic
- Update README.md for major changes
- Document new features thoroughly
Feel free to open an issue if you have any questions about contributing to the project. We're happy to help!
Thank you for contributing to BrainsMath! 🚀