Welcome to the Scoring-Tool repository! This README will guide you through the setup and usage of the project. Follow these steps to get your development environment up and running smoothly.
This project is a fully-dockerized tool to score images by different users for scientific purpose. It's a redcore-derivative.
- Creating projects and uploading Images to Score
- Configure how many scores are needed for each image
- Mark images as useless (if they are not suitable)
- Check some metrics like fleiss-kapa to see if your scorers agree
- Backend: Django using rest_framework
- Frontend: React
- Database: Postgres:16
- Reverse-Proxy: Nginx
Before you begin, ensure you have the following installed on your system:
- Docker
- Python
- Node.js and npm
Add some URLs to your hosts-file, so they are locally available!
Unix
sudo tee -a /etc/hosts > /dev/null <<EOT
127.0.0.1 api.scoring.local
127.0.0.1 scoring.local
EOT
Windows:
- Shame on you for using such a bad OS!
- Your host-file is at:
%windir%\System32\drivers\etc
- Copy the above code (between EOT) and save the file
-
Copy environment templates:
cp .env.template .env cp django.template django.env
-
Edit the environment files as needed:
Open .env and django.env in your favorite text editor and configure them according to your requirements.
-
Start the Docker containers: This will start all necessary services in the background.
docker compose up -d
To start the local backend server, follow these steps:
-
Apply migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser:
This command will prompt you to enter details for the admin user.
python manage.py createadmin
-
Start backend-server:
python manage.py runserver localhost:8000
To start the local frontend server, follow these steps:
cd frontend
npm install
npm start
This will open a browser with the frontend visible.
If you run this on an accessible webserver (aka without VPN), you should secure it by only allowing the needed ports. i got you covered!
# Install UFW on Debian/Ubuntu-based systems
sudo apt-get update
sudo apt-get install ufw
# Install UFW on RHEL/CentOS-based systems
sudo yum install epel-release
sudo yum install ufw
# Enable UFW
sudo ufw enable
# Allow ports 22 (SSH), 80 (HTTP), and 443 (HTTPS)
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Deny all other incoming traffic
sudo ufw default deny incoming
# Allow all outgoing traffic
sudo ufw default allow outgoing
# Reload UFW to apply the changes
sudo ufw reload
# Check UFW status
sudo ufw status
Output should look like this:
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
Still, this project does not yet support HTTPS. But you can using Certbot
For any inquiries or issues, please open an issue on GitHub
Happy coding! 🎉🚀