Skip to content

mellonpass/server

Repository files navigation

API Server

MellonPass backend server (GraphQL, docker, and database)

Getting started

Prerequisites

Make sure you have the following installed on your machine:

Installation

  1. Cloning the repository:

    git clone git@github.com:mellonpass/server.git
    

Running the application

  1. Build service images:

    docker compose build
    
  2. Starting required services:

    docker compose up
    
  • GraphQL server is accessible via http://localhost:8000/graphql.
  • Django admin is accessible via http://localhost:8000/admin.
    • See docker-compose.yml file for a test admin user and test user credentials.

Development

Django shell

To access Django shell session:

docker exec -it mellonpass_server poetry run python manage.py shell_plus

Testing

To run the tests:

docker exec -it mellonpass_server poetry run pytest .

or via tox:

# To run all tests.
tox

# To run specific tests.
tox -- mp/apps/authx/tests/test_services.py

# Use -x to stop at first error and --ff to run tests first that failed last time.
tox -- -x --ff mp/apps/authx/tests

Formatting

To format the codebase:

docker exec -it mellonpass_server poetry run ./scripts/dev/autoformat .

Note: We use ruff to format code.

Container session

To get into the container:

docker exec -it mellonpass_server bash

Then you can run all bash commands inside the container.

Pre-commit

Install pre-commit hooks configuration:

pre-commit install

Contributing

To contribute, follow these steps:

  • Fork the repository.
  • Create a new branch (git checkout -b feat/your-feature).
  • Make your changes.
  • Commit your changes. See conventional-commits for composing commit messages.
  • Push to the branch (git push origin feat/your-feature).
  • Open a pull request.

License

This project is licensed under the GPL v3 License. See the LICENSE file for details.

About

MellonPass backend server powered by Django

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors