Thank you for considering contributing to Forum! We appreciate your time and effort and want to ensure that the contribution process is as smooth and transparent as possible.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
If you encounter any bugs, inconsistencies, or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please include:
- A clear and descriptive title.
- Steps to reproduce the issue.
- Any relevant screenshots or logs.
- The expected and actual behavior.
- Fork the repository: Create your own copy of the project.
- Create a new branch: Use a descriptive name for your branch, e.g.,
feature/add-authentication
. - Make your changes: Ensure your code adheres to the coding standards of the project.
- Test your changes: Run the tests to verify that your changes don't break anything.
- Commit your changes: Write a clear and concise commit message.
- Push to your branch: Push the changes to your forked repository.
- Open a Pull Request: Describe your changes and the problem they solve. Reference any related issues or PRs.
If you have an idea for a new feature, please first open an issue to discuss the idea with the maintainers. This allows us to ensure that your work aligns with the project's goals before you invest significant time in it.
The backend of our project is developed in Go (version 1.23.0). To set up your environment:
- Install Go: Ensure Go 1.23.0 is installed on your system.
- Clone the repository:
git clone https://github.com/longsizhuo/forum.git
- Navigate to the BackEnd directory:
cd BackEnd
- Install dependencies: Run
go mod tidy
. - Generate gRPC code:
protoc --go_out=BackEnd\ --go-grpc_out=BackEnd\ BackEnd\proto\forum.proto protoc --go_out=BackEnd\ --go-grpc_out=BackEnd\ BackEnd\proto\chat.proto protoc --go_out=BackEnd\ --go-grpc_out=BackEnd\ BackEnd\proto\auth.proto
- Build the project: Run go build ./....
The frontend is built using npm. To set up the frontend:
-
Navigate to the FrontEnd directory:
cd FrontEnd
-
Install dependencies: Run npm install.
-
Generate gRPC-Web code:
protoc -I ./BackEnd/proto ./BackEnd/proto/auth.proto --js_out=import_style=commonjs:./FrontEnd/src/proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./FrontEnd/src/proto
protoc -I ./BackEnd/proto ./BackEnd/proto/forum.proto --js_out=import_style=commonjs:./FrontEnd/src/proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./FrontEnd/src/proto
protoc -I ./BackEnd/proto ./BackEnd/proto/chat.proto --js_out=import_style=commonjs:./FrontEnd/src/proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./FrontEnd/src/proto
- Build the project: Run npm run build.
To ensure the stability and reliability of the project, we require that all changes be thoroughly tested.
- BackEnd Testing: Run go test ./... to execute backend tests.
- FrontEnd Testing: Run npm test to execute frontend tests.
Please write tests for any new functionality and ensure that all existing tests pass before submitting your code.
For general questions or discussions, feel free to open a discussion on the GitHub repository or reach out via email at [email protected]
By contributing to this project, you agree to abide by our Code of Conduct. Thank you for your contributions!