Disclaimer: Authenticator is working well but authorization is not implemented yet. Please do not use in such environments that can effect you financially.
This is an application implemented with FastAPI, Mongodb where you can create Users, Brands, Apps and report bugs and add Slack, Clickup integrations.
Users can have multiple Brands (Users can be considered as Organizations too)
Brands can have multiple Apps
For bug reporting, you need to use api key generated from brand (The Api key will be generated when you add a new brand automatically but also, you can generate a new one via {API_URL}/api/v1/brands/get-api-key
with Brand ID param)
Client apps can report bugs along with Bundle ID and Platform and other details can be found in {API_URL}/docs
. If the bundle ID is not saved, We create a new APP for that bundle ID along with correspondent Brand ID and User ID and platform information.
- Makesure python version is 3.7 or more.
- Clone the repo.
git clone https://github.com/ertyurk/bugme-backend.git
- Go to project folder and Create a virtual environment.
cd backend python3 -m venv .venv
- Activate virtual environment.
chmod +x .venv/bin/activate source .venv/bin/activate
- You can deactivate with
deactivate
- You can deactivate with
- Install dependencies.
pip install -r requirements.txt
- Copy and update Environment variables with your mongo db url, table, secret key
cp .env.sample .env
- For secret key I use
openssl rand -base64 128
- For secret key I use
- Start the app with watcher to reload the app for each file change.
uvicorn app.main:app --reload
-
Clone this repo.
git clone https://github.com/ertyurk/bugme-backend.git
-
Update DNS config from CF or other domain provider.
-
Copy
env.copy
to.env
and Put desired credentials into.env
. -
Give permission to
setup.sh
and execute it for docker setup. (prepared for Ubuntu 20.04.3. If your environment is not matching, pass this step and install docker on your own.)chmod +X setup.sh ./setup.sh
-
To start server
docker-compose -f docker-compose.prod.yml up -d --build
- If you want to run docker as non-root user then you need to add it to the docker group.
- Create the docker group if it does not exist
sudo groupadd docker
- Add your user to the docker group.
sudo usermod -aG docker $USER
- Run the following command or Logout and login again and run (that doesn't work you may need to reboot your machine first)
newgrp docker
- Check if docker can be run without root
docker run hello-world
- Reboot if still got error
reboot
- Now you can run build
docker-compose -f docker-compose.prod.yml up -d --build
- Create the docker group if it does not exist
- If you want to use Digital ocean spaces, just revert commit id: 13e4998369c61c81aaac4abbd1263e5e9943728a
- Implemented with FastAPI.
- Docker cheat sheet.
- Traefik used for dockerized proxy setup.
- MongoDB Atlas is used in this project for the MVP for cost efficiency. I will move it to Digital ocean DB Cluster to increase performance.