Gorilla Sports Admin Tools
Interne administratietool voor Gorilla Sports B.V.
Live: https://admin.gorillasports.nl
π Inhoudsopgave
Overzicht
De Gorilla Sports Admin Tools is een self-hosted interne applicatie voor het beheren van:
- Shopify data synchronisatie - Producten en orders importeren
- Leverancier prijslijsten - Vergelijken met huidige inkoopprijzen
- Factuurverificatie - Controleren van leveranciersfacturen tegen Shopify orders
- Prijswijzigingen - Goedkeuringsworkflow voor prijsaanpassingen
- Gebruikersbeheer - Toegangscontrole en rechten
Waarom deze tool?
Gorilla Sports werkt met een Duitse leverancier die maandelijks facturen stuurt. Deze tool helpt bij:
- Controle: Zijn de gefactureerde prijzen correct?
- Detectie: Zijn er prijswijzigingen in de nieuwe prijslijst?
- Goedkeuring: Dubbele check voordat prijzen worden aangepast
- Audit trail: Wie heeft wat wanneer goedgekeurd?
Functionaliteiten
β GeΓ―mplementeerd
Dashboard
- Overzicht van data versheid (laatste sync tijden)
- Statistieken: producten, orders, afwijkingen
- Acties die aandacht nodig hebben
- Data kwaliteit indicatoren
Authenticatie & Gebruikersbeheer
- Login met email/wachtwoord
- JWT-based sessies (1 week geldig)
- Gebruikers aanmaken, bewerken, deactiveren
- Wachtwoord resetten
- Rechten: Admin, Prijzen goedkeuren
Data Uploads
- Shopify producten (CSV)
- Shopify orders (CSV)
- Leverancier prijslijst (Excel)
- Factuuroverzicht (Excel/CSV)
- Factuur PDF's (archief)
π§ Nog te bouwen
- Shopify API integratie (automatische sync)
- Gmail API integratie (automatisch facturen ophalen)
- Factuurverificatie flow met 4 checks
- Email alerts bij problemen
- Automatische weekelijkse sync
Gebruikers
| Naam | Rol | Rechten | |
|---|---|---|---|
| Mark | mark@gorillasports.nl | Admin | Alles |
| Evert | evert@gorillasports.nl | Gebruiker | Prijzen goedkeuren |
| Nadia | nadia@gorillasports.nl | Gebruiker | Basis toegang |
Rechten systeem
- Admin: Kan gebruikers beheren, alle instellingen aanpassen
- Kan Prijzen Goedkeuren: Mag prijswijzigingen goedkeuren/afwijzen
- Basis: Kan data bekijken en uploaden
Technische Stack
Backend
| Python 3.11 | Programmeertaal |
| FastAPI | Web framework |
| SQLAlchemy 2.0 | ORM (async) |
| SQLite | Database |
| bcrypt | Wachtwoord hashing |
| python-jose | JWT tokens |
Frontend
| Vanilla JavaScript | Geen framework |
| Lucide Icons | Iconen |
| DM Sans | Font |
Styling (Brand Guide)
- Navy: #0C1A33 (primair)
- Yellow: #FACF2C (CTA/accenten)
- Sharp corners - Geen afgeronde hoeken
Infrastructuur & Deployment
Hosting
| Provider | Hetzner Cloud |
| Server | CPX22 (3 vCPU, 4GB RAM) |
| Locatie | Nuremberg, Duitsland |
| IP | 46.225.11.68 |
| OS | Ubuntu 22.04 |
Deployment Stack
Coolify
Coolify is een self-hosted PaaS (Platform as a Service) vergelijkbaar met Heroku.
- URL: http://46.225.11.68:8000
- Project: gorilla-sports-admin
GitHub Repository
- URL: github.com/mark-gorillasports/admin
- Branch: main
- Auto-deploy: Ja, via webhook
Deployment Workflow
1. Developer pusht naar GitHub (main branch)
β
2. GitHub webhook triggert Coolify
β
3. Coolify pulled nieuwe code
β
4. Docker image wordt gebouwd
β
5. Container wordt (her)gestart
β
6. Health check bevestigt deployment
β
7. Traefik routeert verkeer naar nieuwe container
Lokale Ontwikkeling
Setup
# Clone repository
git clone https://github.com/mark-gorillasports/admin.git
cd admin
# Maak virtual environment
python3 -m venv venv
source venv/bin/activate
# Installeer dependencies
pip install -r requirements.txt
# Start development server
cd backend
python run.py
De app draait dan op: http://localhost:8000
Database
SQLite
De applicatie gebruikt SQLite als database. Dit is voldoende voor een interne tool met weinig concurrent users.
Locatie in container: /app/data/gorilla_tools.db
Modellen
- Users - Gebruikers en authenticatie
- Products - Shopify producten met prijzen
- Orders - Shopify orders
- PriceChanges - Prijswijziging workflow
- PriceLists - Leverancier prijslijsten
- Settings - Applicatie instellingen
API Documentatie
Base URL
- Productie:
https://admin.gorillasports.nl/api - Lokaal:
http://localhost:8000/api
Swagger Docs
Interactieve API documentatie: admin.gorillasports.nl/api/docs
Belangrijke Endpoints
| Methode | Endpoint | Beschrijving |
|---|---|---|
| POST | /auth/login | Inloggen |
| POST | /auth/logout | Uitloggen |
| GET | /auth/me | Huidige gebruiker |
| GET | /health/ | Systeem gezondheid |
| GET | /products/ | Lijst producten |
| GET | /orders/ | Lijst orders |
| GET | /users/ | Lijst gebruikers |
| POST | /uploads/shopify-products | Upload CSV |
Toekomstige Features
Fase 2: Integraties
- Shopify API - Automatisch producten/orders synchroniseren
- Gmail API - Facturen automatisch ophalen
Fase 3: Factuurverificatie
4-check verificatie systeem:
- Order in maandelijks Excel overzicht?
- Order op periodieke factuur?
- Factuurprijs = Excel bedrag?
- Factuurprijs = Shopify kostprijs?
Fase 4: Automatisering
- Wekelijkse automatische Shopify sync
- Email alerts bij afwijkingen
- Rapportages
Changelog
v1.0.0 - 2026-01-24
Initial Release
- β Basis applicatie structuur
- β FastAPI backend met SQLite
- β Vanilla JS frontend
- β JWT authenticatie met login/logout
- β Gebruikersbeheer (CRUD)
- β Dashboard met statistieken
- β Data upload functionaliteit
- β Hetzner deployment via Coolify
- β GitHub integratie met auto-deploy
- β SSL via Let's Encrypt
Support
Ontwikkeld door: Mark van Dorp
Contact: mark@gorillasports.nl