Je platform wordt 1 systeem met 4 lagen:
1. π€ Multi-tenant SaaS
Elke club / trainer:
eigen login
eigen data
eigen planning
eigen spelers
2. βοΈ Backend (Google Sheets β later Firebase upgrade)
Start:
Google Sheets (MVP)
Later:
Firebase / Supabase (SaaS scaling)
3. π Web App (PWA)
werkt op mobiel + desktop
installable app
offline basic support
4. π Modules
π Planning module (week & baan)
π₯ Speler management
π§ Niveau tracking (1β9 leerlijn)
π° Finance module (uren + reiskosten)
π Locatie module
π Dashboard analytics
π Login systeem
π§Ύ Export (PDF / Sheet / WhatsApp)
π MVP SAAS STRUCTUUR (DIRECT BOUWBAAR)
π GOOGLE SHEETS STRUCTUUR
π’ USERS (trainers / clubs)
user_id | club | naam | email | password | rol | tarief | km_tarief
π’ LESSESSEN
id | user_id | datum | tijd | locatie | baan | spelers | niveau | uren | km | kosten | status
π’ SPELERS
id | user_id | naam | email | niveau | progressie | laatste_les | notities
π’ PLANNING
id | user_id | datum | trainer | baan | spelers | type_les | status
βοΈ GOOGLE APPS SCRIPT (SAAS BACKEND)
π LOGIN + TENANT ISOLATION
function login(email, password) {
Β const sheet = SpreadsheetApp.getActive().getSheetByName("USERS");
Β const data = sheet.getDataRange().getValues();
Β for (let i = 1; i < data.length; i++) {
Β Β Β if (data[i][3] === email && data[i][4] === password) {
Β Β Β Β Β return {
Β Β Β Β Β Β Β success: true,
Β Β Β Β Β Β Β user_id: data[i][0],
Β Β Β Β Β Β Β club: data[i][1],
Β Β Β Β Β Β Β naam: data[i][2],
Β Β Β Β Β Β Β tarief: data[i][6],
Β Β Β Β Β Β Β km_tarief: data[i][7]
Β Β Β Β Β };
Β Β Β }
Β }
Β return { success: false };
}
π
LES OPSLAAN (MULTI-USER SAAS)
function saveLesson(data) {
Β const sheet = SpreadsheetApp.getActive().getSheetByName("LESSESSEN");
Β sheet.appendRow([
Β Β Β new Date(),
Β Β Β data.user_id,
Β Β Β data.datum,
Β Β Β data.tijd,
Β Β Β data.locatie,
Β Β Β data.baan,
Β Β Β data.spelers.join(","),
Β Β Β data.niveau,
Β Β Β data.uren,
Β Β Β data.km,
Β Β Β data.kosten,
Β Β Β "completed"
Β ]);
Β updatePlayerProgress(data.user_id, data.spelers, data.niveau);
}
π§ SPELER PROGRESSIE ENGINE (NIVEAU 1β9)
function updatePlayerProgress(user_id, spelers, niveau) {
Β const sheet = SpreadsheetApp.getActive().getSheetByName("SPELERS");
Β const data = sheet.getDataRange().getValues();
Β spelers.forEach(speler => {
Β Β Β let found = false;
Β Β Β for (let i = 1; i < data.length; i++) {
Β Β Β Β Β if (data[i][1] === user_id && data[i][2] === speler) {
Β Β Β Β Β Β Β sheet.getRange(i + 1, 4).setValue(niveau);
Β Β Β Β Β Β Β sheet.getRange(i + 1, 6).setValue(new Date());
Β Β Β Β Β Β Β found = true;
Β Β Β Β Β }
Β Β Β }
Β Β Β if (!found) {
Β Β Β Β Β sheet.appendRow([
Β Β Β Β Β Β Β new Date().getTime(),
Β Β Β Β Β Β Β user_id,
Β Β Β Β Β Β Β speler,
Β Β Β Β Β Β Β niveau,
Β Β Β Β Β Β Β 0,
Β Β Β Β Β Β Β new Date()
Β Β Β Β Β ]);
Β Β Β }
Β });
}
π DASHBOARD DATA
function getDashboard(user_id) {
Β const sheet = SpreadsheetApp.getActive().getSheetByName("LESSESSEN");
Β const data = sheet.getDataRange().getValues();
Β return data.filter(r => r[1] === user_id);
}
π FRONTEND SAAS APP (index.html)
π LOGIN + APP SHELL
<!DOCTYPE html>
<html>
<head>
<title>PadelSchool SaaS</title>
<style>
body{font-family:Arial;background:#f4f4f4;padding:20px;}
.box{background:white;padding:20px;border-radius:10px;margin-bottom:15px;}
input,select,textarea{width:100%;padding:10px;margin:5px 0;}
button{padding:12px;background:#0d6b3c;color:white;border:none;border-radius:6px;}
table{width:100%;border-collapse:collapse;}
td,th{border:1px solid #ddd;padding:8px;}
</style>
<script>
let session = null;
function login(){
google.script.run.withSuccessHandler(res=>{
if(!res.success){
alert("Login fout");
return;
}
session = res;
document.getElementById("login").style.display="none";
document.getElementById("app").style.display="block";
loadDashboard();
}).login(
document.getElementById("email").value,
document.getElementById("password").value
);
}
function saveLesson(){
const spelers = document.getElementById("spelers").value.split(",");
const uren = parseFloat(document.getElementById("uren").value);
const km = parseFloat(document.getElementById("km").value);
const kosten =
(uren * session.tarief) + (km * session.km_tarief);
google.script.run.saveLesson({
user_id: session.user_id,
datum: new Date().toISOString(),
tijd: "09:00",
locatie: document.getElementById("locatie").value,
baan: document.getElementById("baan").value,
spelers: spelers,
niveau: document.getElementById("niveau").value,
uren: uren,
km: km,
kosten: kosten
});
loadDashboard();
}
function loadDashboard(){
google.script.run.withSuccessHandler(data=>{
let html = "<table><tr><th>Datum</th><th>Locatie</th><th>Spelers</th><th>Uren</th><th>Kosten</th></tr>";
data.forEach(r=>{
html += `<tr>
<td>${r[2]}</td>
<td>${r[4]}</td>
<td>${r[6]}</td>
<td>${r[8]}</td>
<td>β¬${r[10]}</td>
</tr>`;
});
html += "</table>";
document.getElementById("dash").innerHTML = html;
}).getDashboard(session.user_id);
}
</script>
</head>
<body>
<div id="login" class="box">
<h2>Trainer Login</h2>
<input id="email" placeholder="Email">
<input id="password" type="password" placeholder="Wachtwoord">
<button onclick="login()">Login</button>
</div>
<div id="app" style="display:none">
<div class="box">
<h2>Nieuwe Les</h2>
<input id="locatie" placeholder="Locatie">
<input id="baan" placeholder="Baan">
<input id="spelers" placeholder="Spelers (komma)">
<select id="niveau">
<option>1</option><option>2</option><option>3</option>
<option>4</option><option>5</option><option>6</option>
<option>7</option><option>8</option><option>9</option>
</select>
<input id="uren" placeholder="Uren">
<input id="km" placeholder="KM">
<button onclick="saveLesson()">Opslaan</button>
</div>
<div class="box">
<h2>Dashboard</h2>
<div id="dash"></div>
</div>
</div>
</body>
</html>
π₯ WAT JE NU HEBT (SAAS LEVEL)
β Multi-trainer login systeem
β Multi-club support (SaaS basis)
β Live Google Sheets database
β Lesregistratie systeem
β Speler progressie tracking (niveau 1β9)
β Reiskosten + uren berekening
β Dashboard per trainer
β Planning structuur (basis)
π NEXT EVOLUTION (ECHTE SAAS)
Als je βGO PRO SAASβ zegt bouw ik dit:
π₯ Phase 2 (echte software)
π± PWA installable app (zoals een echte app store app)
π§ AI coach (analyse per speler)
π automatische weekplanning generator
π baan optimalisatie (AI scheduling)
π club analytics dashboard
π§Ύ automatische facturatie (PDF + Stripe)
π WhatsApp reminders + no-show tracking
π₯ groepsindeling AI (niveau + gedrag)
π multi-club SaaS marketplace
π‘ Belangrijk
Wat je hier eigenlijk aan het bouwen bent:
π βMindbody + TeamSnap + Coachy voor padelβ