Skip to content

social-tw/social-tw-website

Repository files navigation

Unirep Social Taiwan

Github Action Github contributors Github ISSUE Github PR Github Action @unirep/core @unirep/core Linter eslint Code style prettier chat on Discord

Welcome to the unirep social taiwan project. Leveraging the power of Unirep, our mission is to create a platform where community members can engage in discussions with 100% anonymity. We believe in fostering a space where individuals can express their thoughts and ideas securely, without the fear of their identities being revealed.

Join us in our journey towards a more anonymous and secure online community space!

Quickstart

0. Requirements

1. Installation

git clone [email protected]:social-tw/social-tw-website.git
cd social-tw-website
yarn install

2. Start with each daemon

2.1 Build the files

yarn build

2.2 Start a node

yarn contracts hardhat node

2.3 Set up Twitter API Key

cp packages/relay/.env.example packages/relay/.env

Then fill in your Twitter API Key in packages/relay/.env

2.4 Deploy smart contracts

in new terminal window, from root:

yarn contracts deploy

2.5 Start a relayer (backend)

yarn relay start

2.6 Start a frontend

in new terminal window, from root:

yarn frontend start

It will be running at: http://localhost:3000/

3. Test with each daemon

yarn circuits test

contracts

yarn contracts test

frontend

yarn frontend test

relay

yarn relay test

4. Lint

Ensure that your code follows the established style guidelines and is correctly formatted using Prettier:

4.1 Check Code Formatting

View the suggested code formatting without making changes:

yarn lint

4.2 Apply Code Formatting

Automatically format your code to match Prettier's style:

yarn lint:fix

4.3 Verify Code Formatting Ensure that your code is formatted correctly:

yarn lint:check

5. Deploy

5.1 Deploy frontend locally

docker build -t test-frontend:0.1 -f packages/frontend/Dockerfile .

docker run --rm -p 3000:3000 --network="bridge" test-frontend:0.1

5.2 Deploy backend locally

docker build -t test-relay:0.1 -f packages/relay/Dockerfile .

docker run --network="host" --rm -p 8000:8000 test-relay:0.1

Contributing

Getting Started

Before diving into the codebase:

  1. Read the CONTRIBUTING.md: Please ensure you've reviewed our CONTRIBUTING.md. It contains crucial information on our coding standards, the pull request process, and more.

  2. Search Existing Issues: We use the GitHub issue tracker to manage our tasks and bugs. Please spend a few minutes searching for issues to see if someone else has already reported the same problem or suggested the same change. For existing issues, we’ve already assigned story points based on their complexity and the estimated time required to complete them. These story points are essential for the following:

  • Prize: Story points indicate the reward you will receive once the issue is completed and merged by our core team.
  • Time Estimate: Story points also give an estimate of the time required to complete the issue.

To claim an issue, simply comment on the issue thread to let the core team know you’d like to work on it. Please ensure you can complete the issue within the designated timeframe. If you are unable to meet the deadline, we may reassign the issue to other contributors to keep the progress on track.

  1. Reporting New Issues: If you don't find an existing issue that addresses your concern, feel free to open a new one. Provide as much detail as possible to help us understand the context and importance. When creating a new issue, please follow these guidelines:
  • Provide a Descriptive Title: Make sure the title clearly describes the issue or feature request.
  • Include Detailed Information: Provide a clear description of the problem or feature, the steps to reproduce it (if applicable), and any additional context (such as error messages or logs).
  • Proposed Solution (if applicable): If you have a potential solution or an idea on how to resolve the issue, feel free to include that in the description.

The core team will review your issue description, and we will assign appropriate story points. These points reflect the estimated time required to resolve the issue, as well as the reward you’ll receive once the task is completed, reviewed, and merged.

Steps for Contributing

  1. Fork the Repository: If you're not a direct contributor, start by forking the main repository.
  2. Create a New Branch: Branches should be named descriptively. For example: add-login-feature or fix-image-upload-bug.
  3. Implement Your Changes: Make sure your changes adhere to our coding standards and don't introduce new issues.
  4. Submit a Pull Request (PR): Once you're satisfied with your changes, push your branch to your fork and submit a pull request. Our team will review it, suggest changes if necessary, and merge it when it's ready.

Branch naming conventions

Please follow the following branch naming scheme when creating your branch:

  • feature-foo-bar for new features
  • fix-foo-bar for bug fixes
  • test-foo-bar when the change concerns only the test suite
  • refactor-foo-bar when refactoring code without any behavior change

Communication and Collaboration

  • Engage with the Team: Don’t hesitate to ask questions in the issue discussions or PR comments if you need clarification. Collaboration is key to ensuring high-quality contributions.
  • Be Respectful and Professional: While working together, please maintain a respectful and professional tone in all communications. It’s important to create a positive and supportive environment for all contributors.
  • Join the conversation and help the community.