Thank you for considering contributing to Titan Settlers! We welcome any contributions that can help improve the project and make it better for everyone. This document will guide you on how to contribute to this project effectively.
To contribute to this project, you'll need to have the following software installed on your system:
- Node.js (>= 12.x)
- Fork the repository on GitHub.
- Clone your forked repository to your local machine.
- Navigate to the
./
folder and runnpm install
to install the dependencies. - Start the client development server by running
npm run dev
and presso
on the keyboard to run it in your default browser.
Now, you should have the development environment set up and running!
If you encounter any bugs, have feature requests, or want to suggest improvements, please check the existing issues before creating a new one. If your issue or suggestion has already been reported, you can provide additional information or show your support by adding a thumbs-up reaction to the existing issue.
To create a new issue, please include the following details:
- A clear and descriptive title
- Steps to reproduce the issue (if applicable)
- Expected behavior
- Actual behavior
- Any error messages or screenshots (if applicable)
- Environment details (e.g., operating system, browser version)
We appreciate your contributions to this project! If you want to add a new feature, fix a bug, or improve the codebase, follow these steps:
- Ensure that your changes are consistent with the project's goals and coding style.
- Create a new branch for your changes:
git checkout -b my-branch
. - Make your changes and test them thoroughly.
- Commit your changes:
git commit -m "Add my changes"
. - Push your changes to your forked repository:
git push origin my-branch
. - Open a pull request against the
master
branch of the original repository.
We will review your pull request as soon as possible and provide any necessary feedback.
The project follows a Model-View-Controller (MVC) architecture. The folder structure is as follows:
client/
├── public/
├── src/
│ ├── components/
│ ├── features/
│ ├── pages/
│ └── ...
└── ...
Here's an overview of the directory structure for our project:
-
public
: This folder contains background images and other public contents for the site. -
src
: The client-side business code resides here.-
src/app
: This directory houses the secondary endpoint of the site. -
src/assets
: All digital media, including images, videos, and gifs, can be found in this folder. -
src/components
: Reusable components are organized in this directory. -
src/contexts
: You'll find contexts and context providers for the project here. -
src/hooks
: Custom hooks are stored in this folder. -
src/layout
: There are two main types of layouts available: "blank" and "main." -
src/pages
: Page-level code is located in this directory. -
src/routes
: Routing-related code can be found in this folder. -
src/utils
: Utility functions are organized within this directory.
-
This structured organization helps us maintain and develop our project efficiently by keeping related code and assets organized in a clear and logical manner.
- React (ui library)
- Tailwindcss: css framework for designing
- framer-motion: library for doing animations
- swr: For data fetching
- mousetrap: For handling mouse events
- react-sound: For managing audio
We follow a consistent code style throughout the project. Some key guidelines include:
- Use meaningful variable and function names.
- Follow the JavaScript/React style guide (e.g., Airbnb JavaScript Style Guide).
- Use indentation with 4 spaces.
- Write clear and concise comments when necessary.
The project currently not includes any suite of tests.
By contributing to this project, you agree that your contributions will be licensed under the LICENSE of the project.
We appreciate your time and efforts in contributing to Titan Settlers! If you have any questions or need further assistance, feel free to reach out to the project maintainers.
Happy coding!