First off, thank you for considering contributing to Griddy Movies! It's people like you that make Griddy Movies such a great tool.
- Code of Conduct
- Project Structure
- Development Setup
- Making Changes
- Coding Standards
- Pull Request Process
- Environment Variables
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to vfourcode@gmail.com.
griddy-movies/
├── src/
│ ├── api/ # API related code
│ │ └── requests/ # API request functions
│ ├── app/ # Next.js app directory
│ │ ├── contact/ # Contact page
│ │ ├── media/ # Media pages (movies, shows, player)
│ │ └── page.jsx # Home page
│ └── components/ # React components
│ ├── Footer/ # Footer components
│ ├── Card.jsx # Movie/Show card component
│ ├── HeroSection.jsx # Homepage hero section
│ ├── MovieGrid.jsx # Grid layout for movies/shows
│ └── ... # Other components
├── public/ # Static files
├── .env # Environment variables
└── tailwind.config.js # Tailwind CSS configuration
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/griddy-movies.git
- Install dependencies:
npm install
- Create a
.env.local
file based on.env.local_sample
:NEXT_PUBLIC_API_KEY=your_tmdb_api_key
- Start the development server:
npm run dev
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes
- Test your changes
- Commit your changes:
git commit -m "feat: add new feature"
- Use JSX for new components
- Follow the existing code style
- Use meaningful variable and function names
- Write comments for complex logic
- Keep components small and focused
- Use proper component organization:
// Component structure import statements type definitions component function helper functions styles (if any) export
- Use functional components with hooks
- Implement proper error handling
- Add loading states
- Make components responsive
- Follow accessibility best practices
- Components: PascalCase (e.g.,
MovieCard.jsx
) - Files: kebab-case (e.g.,
api-utils.js
) - Functions: camelCase (e.g.,
fetchMovieData
) - CSS classes: kebab-case (e.g.,
movie-card
)
- Update the README.md with details of changes if needed
- Update the documentation if you're changing functionality
- The PR must pass all checks and have no conflicts
- Get at least one code review from a maintainer
- Follow the PR template provided
Required environment variables:
NEXT_PUBLIC_API_KEY= # TMDB API key
NEXT_PUBLIC_GA_ID= # Google Analytics ID (optional)
The project uses TMDB API for movie and TV show data. When working with the API:
- Use the existing request functions in
src/api/requests
- Follow rate limiting guidelines
- Handle errors appropriately
- Cache responses when possible
- Write tests for new features
- Update existing tests when modifying features
- Run the test suite before submitting PR:
npm run test
- Document new features
- Update existing documentation when making changes
- Use JSDoc for function documentation:
/** * Fetches movie data from the API * @param {string} id - Movie ID * @returns {Promise<MovieData>} Movie information */
The project is deployed on Vercel. Make sure your changes:
- Pass all build checks
- Are optimized for production
- Don't break existing functionality
- Follow security best practices
Feel free to:
- Open an issue for bugs
- Start a discussion for features
- Contact maintainers for guidance
By contributing, you agree that your contributions will be licensed under the MIT License.