Skip to content

Mind-Vault-AI/mvai-connexx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

208 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MVAI Connexx β€” Multi-Tenant Enterprise Platform

Live demo: connexx.mindvault-ai.com

Python Flask SQLite Hostinger VPS Status


Overzicht

MVAI Connexx is een production-ready multi-tenant platform voor logistieke data borging en procesoptimalisatie. Het systeem biedt veilige, geΓ―soleerde omgevingen voor meerdere klanten met professioneel dashboard, analytics en export functionaliteit.

✨ Features

πŸ” Authentication & Security

  • Access code authenticatie voor klanten en admins
  • Session management met 24-uur expiratie
  • Multi-tenant isolatie - elke klant ziet alleen eigen data
  • IP tracking via X-Forwarded-For headers (proxy-aware)

πŸ‘₯ Customer Dashboard

  • Real-time data input via terminal interface
  • Live statistieken (totaal logs, vandaag, deze week)
  • Data visualisatie en overzichten
  • CSV export van alle data
  • Zoekfunctionaliteit in eigen logs
  • Mobile-optimized UI (Samsung S23 Plus getest)

πŸ‘¨β€πŸ’Ό Admin Panel

  • Overzicht alle klanten en data
  • Klantenbeheer (toevoegen, activeren/deactiveren)
  • Automatische access code generatie
  • Globale statistieken en analytics
  • Top 5 actiefste klanten
  • Zoeken in klanten en logs
  • CSV export van alle data

🎨 Professional UI/UX

  • Modern dark theme (MVAI branding)
  • Mobile-first responsive design
  • Terminal-style data input interface
  • Clean en intuitive navigation
  • Samsung S23 Plus geoptimaliseerd

πŸ’³ Subscription & Payments (NIEUW!)

  • 6 Pricing Tiers (Demo, Particulier, MKB, Starter, Professional, Enterprise)
  • Gumroad integratie - PayPal backend (info@mindvault-ai.com)
  • Automatic tier activation via webhooks
  • Usage tracking met real-time limits
  • Self-service upgrades/downgrades
  • Email notifications (welcome, upgrades, alerts)
  • Stripe ready (voor later, na KVK)

πŸ’Ύ Database

  • SQLite database met multi-tenant schema
  • Automatische migratie van JSON naar SQLite
  • Efficient indexing voor performance
  • Foreign key constraints voor data integriteit

πŸš€ Quick Start

1. Installatie

# Clone repository
git clone https://github.com/Mind-Vault-AI/mvai-connexx.git
cd mvai-connexx

# Installeer dependencies
pip install -r requirements.txt

2. Demo Data Seeding

Voor een snelle demo met fictieve bedrijven:

python seed_demo.py

Dit maakt aan:

  • 1 admin account
  • 5 demo klanten (TransLog Nederland, VanderMeer Logistics, etc.)
  • 50+ fictieve log entries

Login credentials worden geprint na seeding!

3. Start Applicatie

# Development
python app.py

# Production (met Gunicorn)
gunicorn --bind 0.0.0.0:5000 app:app

Open browser: http://localhost:5000

4. Migratie van Bestaande Data (optioneel)

Als je bestaande mvai_data.json hebt:

python migrate.py

Dit migreert alle JSON logs naar SQLite en maakt een backup.

πŸ“ Project Structuur

mvai-connexx/
β”œβ”€β”€ app.py                 # Flask applicatie (multi-tenant)
β”œβ”€β”€ database.py            # Database module (SQLite)
β”œβ”€β”€ migrate.py             # JSON β†’ SQLite migratie script
β”œβ”€β”€ seed_demo.py           # Demo data seeding
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ Dockerfile             # Docker container
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ login.html         # Login pagina
β”‚   β”œβ”€β”€ customer_dashboard.html
β”‚   β”œβ”€β”€ customer_logs.html
β”‚   β”œβ”€β”€ customer_search.html
β”‚   β”œβ”€β”€ admin_dashboard.html
β”‚   β”œβ”€β”€ admin_customers.html
β”‚   β”œβ”€β”€ admin_customer_detail.html
β”‚   β”œβ”€β”€ admin_create_customer.html
β”‚   β”œβ”€β”€ admin_logs.html
β”‚   β”œβ”€β”€ admin_search.html
β”‚   └── error.html
└── mvai_connexx.db        # SQLite database (aangemaakt bij eerste run)

πŸ—„οΈ Database Schema

Customers

  • id - Primary key
  • name - Bedrijfsnaam (unique)
  • access_code - Unieke login code
  • status - active/inactive
  • contact_email - Contact email
  • company_info - Extra info/notities
  • created_at - Timestamp

Logs

  • id - Primary key
  • customer_id - Foreign key naar customers
  • ip_address - Client IP (X-Forwarded-For aware)
  • timestamp - Log tijdstip
  • data - JSON data
  • metadata - Extra metadata (optioneel)

Admins

  • id - Primary key
  • username - Admin gebruikersnaam
  • access_code - Admin login code
  • created_at - Timestamp

πŸ”§ API Endpoints

Public Routes

  • GET / - Redirect naar login/dashboard
  • GET /login - Login pagina
  • POST /login - Login verwerking
  • GET /logout - Uitloggen

Customer Routes (login required)

  • GET /dashboard - Customer dashboard
  • POST /api/save - Data opslaan (backward compatible)
  • GET /customer/logs - Alle logs bekijken
  • GET /customer/export/csv - CSV export
  • GET /customer/search - Zoeken in logs

Admin Routes (admin required)

  • GET /admin - Admin dashboard
  • GET /admin/customers - Klantenoverzicht
  • GET /admin/customer/<id> - Klant details
  • GET /admin/customer/create - Nieuwe klant aanmaken
  • POST /admin/customer/<id>/toggle-status - Status toggle
  • GET /admin/logs - Alle logs
  • GET /admin/search - Zoeken
  • GET /admin/export/all-csv - Volledige CSV export

πŸš€ Deployment

Platform Status URL
Hostinger VPS βœ… Primair connexx.mindvault-ai.com
Render βœ… Actief via render.yaml

πŸ“– Volledige deployment handleiding: DEPLOY.md

  • Hostinger VPS β€” push naar main β†’ GitHub Actions (.github/workflows/deploy-hostinger.yml) deployt automatisch via SSH.
  • Render β€” push naar main β†’ Render deployt automatisch via render.yaml.
  • Benodigde GitHub Secrets: VPS_HOST, VPS_USER, VPS_SSH_KEY

🐳 Docker (optioneel)

docker build -t mvai-connexx .
docker run -p 5000:5000 mvai-connexx

πŸ” Security Features

  • βœ… Geen hardcoded credentials - access codes worden random gegenereerd
  • βœ… Session-based authentication met secure cookies
  • βœ… Multi-tenant data isolatie op database niveau
  • βœ… IP tracking voor audit trail
  • βœ… Input sanitization via Flask
  • βœ… SQL injection protection via parameterized queries
  • βœ… XSS protection via template escaping

πŸ“Š Admin Functies

Nieuwe Klant Aanmaken

  1. Login als admin
  2. Ga naar "Klanten" β†’ "Nieuwe Klant"
  3. Vul bedrijfsnaam in (verplicht)
  4. Optioneel: email en bedrijfsinfo
  5. Klik "Klant Aanmaken"
  6. Access code wordt automatisch gegenereerd en getoond!
  7. Deel deze code veilig met de klant

Klant Deactiveren

  1. Ga naar klant detail pagina
  2. Klik "Deactiveer Klant"
  3. Klant kan niet meer inloggen (data blijft behouden)

Data Exporteren

Per klant (admin):

  • Ga naar klant detail β†’ CSV export knop

Alle data (admin):

  • Admin Dashboard β†’ "Exporteer CSV"

Per klant (customer):

  • Customer Dashboard β†’ "Exporteer CSV"

🎯 Roadmap / Toekomstige Features

βœ… GEÏMPLEMENTEERD (production-ready):

  • βœ… Pricing tiers - 6 tiers (Demo, Particulier, MKB, Starter, Professional, Enterprise)
  • βœ… Payment processing - Gumroad integratie (PayPal backend via info@mindvault-ai.com)
  • βœ… Subscriptie logica - Upgrade/downgrade met automatic tier activation
  • βœ… Email notificaties - SMTP met professional HTML templates (welcome, upgrade, alerts)

Payment Strategie:

  • 🎯 NU: Gumroad β†’ PayPal (actief na $100 verkopen) - geen KVK vereist
  • πŸ”„ LATER: Stripe (zodra KVK nummer beschikbaar) - lagere fees

Mogelijk in toekomst:

  • πŸ“Š PDF export met grafieken
  • πŸ“± Progressive Web App (PWA)
  • πŸ”” Real-time notificaties
  • πŸ“ˆ Geavanceerde analytics dashboards
  • πŸ€– AI-powered insights (basis AI Assistant al aanwezig)

πŸ› Troubleshooting

Database locked errors

# Stop alle processen
pkill -f "python app.py"

# Verwijder database en seed opnieuw
rm mvai_connexx.db
python seed_demo.py

Port already in use

# Vind proces op poort 5000
lsof -i :5000

# Kill proces
kill -9 <PID>

Import errors

# Herinstalleer dependencies
pip install --upgrade -r requirements.txt

πŸ“ Licentie

Β© 2025 Mind Vault AI. All Rights Reserved.

🀝 Support

Voor vragen of issues:


Built with ❀️ by Mind Vault AI

Logistic Intelligence | Validatie, Borging & Procesoptimalisatie

About

MVAI-CONNEXX - Data Manager - Enable Connect To Every Systems - Cloud -Internal

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors