Skip to content

Latest commit

 

History

History
171 lines (109 loc) · 6.16 KB

CONTRIBUTING.md

File metadata and controls

171 lines (109 loc) · 6.16 KB

Contribution Guide for Zango

Table of Contents

  1. How to Contribute
  2. Contributing to Zango backend
  3. Contributing to Zango frontend
  4. Contributing to documentation
  5. Community

How to Contribute

Reporting Issues

If you find a bug or have a feature request, please create an issue in our issue tracker. When reporting an issue, please include as much detail as possible, including steps to reproduce the problem, your environment, and any relevant log output.

Contributing to Zango

This section describes the general practices for contributing to zango, you can check the next sections which describe how to contribute to frontend, backend and documentation

Getting Started

  1. Fork the Repository: Fork the Zango repository to your GitHub account.
  2. Clone the Repository: Clone your forked repository to your local machine.
  3. Set Up Environment: Follow the setup instructions in Setup.md to configure your development environment.

Development Workflow

  1. Create a Branch: Create a new branch for your changes.
    git checkout -b feature/your-feature-name
  1. Implement Changes: Make your changes, ensuring to follow the coding standards and best practices.
  2. Install pre-commit: In the root directory of this repo run pre-commit install.This will ensure that pre-commit automatically runs the configured hooks (such as code formatters, linters, and other checks) on your files before each commit, helping to maintain code quality and consistency.
  3. Commit Changes: Commit your changes with a meaningful commit message.
    git add .
    git commit -m "Add feature <feature_name>"

Submitting Changes

  1. Push to GitHub: Push your changes to your forked repository.
    git push origin feature/your-feature-name
  1. Create a Pull Request: Open a pull request from your branch to the main branch of the original repository. Provide a clear description of your changes and link any related issues.

Code Review

  1. Respond to Feedback: Be prepared to make changes based on feedback from code reviewers.
  2. Update PR: Push any updates to your branch to reflect the feedback received.

Contributing to Zango backend

Steps to contribute to Zango backend

  1. Clone the zango repository
  2. Create a new virtual environment inside a fresh directory (this virtual env will be used to setup a zango project using local copy of zango similar to django.)
  3. Activate your virtual env and run the below command to install local copy of zango:
    pip install -e path/to/your/zango_repo/backend
  1. Perform the steps to setup a new project as described in the docs here.
  2. Start your project and launch a new app.
  3. Now whatever changes you will do to your local zango it will be reflected in your project.

Running Migrations: You can run all the Zango migrations using the command python manage.py migrate_schemas, this is for the zango core migrations only, you can create and run app specific migrations as described here.

Static Files: To add static files that you have added to Zango, you can use the command python manage.py collectstatic.

Contributing to Zango frontend

with mock server

  1. Go to the frontend directory of the repository and install the dependencies
    cd frontend
    yarn install
  1. Start the application with mock service worker
    yarn mock

with live data

Prerequisite

Before running this application, ensure that your Zango backend is up and running.

Default Port Configuration

By default, the application uses Zango's default running port (localhost:8000). If you wish to use a different port, you can easily configure this in your package.json file under the proxy key.

  1. Go to the frontend directory of the repository and install the dependencies
    cd frontend
    yarn install
  1. Start the application with dev server
    yarn dev

Generating and Using frontend build in Zango

To test your frontend app with the Zango framework, follow these steps:

Run the build command:

    yarn build

This command generates the build and places it inside the backend/src/zango/assets/app_panel/js directory of Zango.

The generated build will include the latest timestamp in its filename (build.<timestamp>.min.js). By default, the most recent build will be served. If you need to use a different build, you can update the filename in the backend/src/zango/apps/shared/tenancy/templates/app_panel.html file.

  1. Collecting Static Build for Your Project

Before testing the build, collect the static files for your project. Ensure your project is already created and your environment is activated.

Change directory to your project:

    cd <project_name>

Collect the static build:

    python manage.py collectstatic

Contributing to Documentation

We use docusaurus for maintaining Zango's documentation

  1. Go to the docs directory of the repository and install the dependencies
    cd zango/docs
    yarn install
  1. Start the application
    yarn start

Community

If you face any issues or need any help you can use our discord to connect with other contributors.