greenfield-school/
├── index.html ← Homepage
├── about.html ← About the school
├── academics.html ← Curriculum & classes
├── admissions.html ← How to apply & fees
├── news.html ← News & announcements
├── gallery.html ← Photo gallery
├── contact.html ← Contact form + Google Map
├── portal-login.html ← Student & staff login
├── css/
│ └── style.css ← All shared styles
├── js/
│ ├── main.js ← All shared JavaScript
│ └── supabase-client.js ← Supabase backend functions
├── assets/
│ ├── logo.png ← School logo (replace with yours)
│ └── images/ ← Any custom photos
└── supabase-schema.sql ← Database setup script
Supabase is a free online database platform. Think of it as the "brain" behind your website — it stores student records, results, announcements, and contact messages securely.
- Open your browser and go to: https://supabase.com
- Click the green "Start your project" button.
- Sign up using your Google account or a school email address.
- Once logged in, click "New project".
- Fill in the details:
- Project name: e.g.
greenfield-school - Database password: Choose a strong password and save it somewhere safe
- Region: Select "West US" or any available region (there is no Nigeria region yet — West US or EU West are both fine)
- Project name: e.g.
- Click "Create new project" and wait about 2 minutes for it to be ready.
- In your Supabase dashboard, click "SQL Editor" in the left sidebar.
- Click "New query" (the + button).
- Open the file
supabase-schema.sqlfrom your project folder. - Copy ALL the text in that file (Ctrl+A then Ctrl+C).
- Paste it into the Supabase SQL Editor.
- Click the green "Run" button (or press Ctrl+Enter).
- You should see a success message. Your tables are now created.
Tip: If you see any error messages, run the script in smaller sections —
first just the CREATE TABLE blocks, then the ALTER TABLE blocks, then the
CREATE POLICY blocks.
- In the left sidebar, click "Authentication".
- Click "Providers".
- Find "Email" in the list — it should already be enabled by default.
- Make sure the toggle is ON (green).
- Optional: Turn off "Confirm email" during testing so logins work immediately without verifying an email address. (Turn it back ON for live use.)
RLS means each user can only see data they are allowed to see. You enabled it via the SQL script in Step 2. Let's confirm:
- In the left sidebar, click "Table Editor".
- Click on the "students" table.
- At the top, you should see a padlock icon 🔒 saying "RLS enabled".
- Repeat for:
staff,announcements,contact_messages,results.
If any table shows RLS as OFF, click the table → click the shield/padlock icon → toggle it ON.
Your website needs two pieces of information to talk to Supabase:
- In the left sidebar, click "Settings" (gear icon ⚙️).
- Click "API".
- You will see:
- Project URL — looks like:
https://abcdefghijklmn.supabase.co - Project API keys → anon / public — a long string of letters and numbers
- Project URL — looks like:
Copy both of these. You need them in the next step.
-
Open the file
js/supabase-client.jsin a thttps://ext editor (e.g. Notepad, VS Code, or Notepad++). -
Find these two lines near the top:
const SUPABASE_URL = '-----'; const SUPABASE_ANON = '-----';
-
Replace
YOUR_SUPABASE_URLwith your Project URL (keep the quotes). -
Replace
YOUR_SUPABASE_ANON_KEYwith your anon/public key (keep the quotes).Example (yours will be different):
const SUPABASE_URL = 'https://abcdefghijklmn.supabase.co'; const SUPABASE_ANON = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
-
Save the file.
- In Supabase, click "Authentication" → "Users" → "Invite user".
- Enter the school admin email address.
- The user will receive an email to set their password.
- Once they log in, you will need to set their role in the user metadata.
In the Supabase dashboard → Authentication → Users → click the user →
edit "Raw User Meta Data" to add:
{"role": "admin"}
For students/staff, set metadata like:
- Student:
{"role": "student", "student_id": "<uuid from students table>"} - Staff:
{"role": "staff", "subject": "Mathematics"}
Netlify lets you put your website on the internet for free in minutes.
- Go to: https://netlify.com
- Click "Sign up".
- Sign up with GitHub, GitLab, or an email address.
- Complete the email verification if required.
Method A — Drag and Drop (Easiest)
- Log into your Netlify account.
- On the dashboard, you will see a box that says: "Drag and drop your site folder here"
- Open your computer's file explorer and find your
greenfield-schoolfolder. - Drag the ENTIRE
greenfield-schoolfolder and drop it onto that Netlify box. - Netlify will upload and deploy your site in about 30 seconds.
- You will get a random URL like:
https://quirky-rainbow-12345.netlify.app
Method B — GitHub (Recommended for future updates)
- Upload your project folder to a free GitHub repository.
- In Netlify, click "New site from Git".
- Connect your GitHub account and select the repository.
- Netlify will automatically rebuild your site every time you update the files.
- In your Netlify dashboard, click on your deployed site.
- Click "Site settings" → "Domain management".
- Under "Custom domains", click "Options" → "Edit site name".
- Type your preferred subdomain, e.g.:
greenfieldabuja - Your site will now be at: https://greenfieldabuja.netlify.app (This is free and you can share this link immediately.)
If you prefer not to put your Supabase keys directly in the JavaScript file (for better security), you can use Netlify environment variables. However, since this is a public website using the anon key only (which is safe to expose), putting them directly in the JS file is acceptable.
If you still want to use environment variables:
- Netlify Dashboard → Site Settings → Environment Variables.
- Add:
SUPABASE_URLandSUPABASE_ANON_KEY. - Then update your JS to read from these variables.
Nigerian domain registrars:
| Registrar | Website | Notes |
|---|---|---|
| WhoGoHost | whogohost.com | Popular, easy, Nigerian |
| Web4Africa | web4africa.ng | .edu.ng specialist |
| Qservers | qservers.net | Good local support |
Steps:
- Visit one of the registrars above.
- Search for your domain, e.g.
greenfieldabuja.edu.ng(Note: .edu.ng requires proof of being an educational institution — you may need to submit your school's registration documents. Use .com.ng or .ng if .edu.ng is too complex to start.) - Purchase the domain (typically ₦5,000–₦15,000 per year).
- Create an account and pay via bank transfer or card.
- In your Netlify dashboard → Site Settings → Domain Management.
- Click "Add custom domain" and enter your domain (e.g.
greenfieldabuja.com.ng). - Netlify will show you DNS records to add. You need two records:
- Type:
A| Name:@| Value:75.2.60.5 - Type:
CNAME| Name:www| Value:greenfieldabuja.netlify.app
- Type:
- Log into your domain registrar's control panel.
- Find "DNS Management" or "Nameservers".
- Add the two records above.
- Wait 24–48 hours for DNS to propagate (take effect worldwide).
- Netlify provides a free SSL certificate automatically (your site will show the padlock 🔒 in browsers).
After your website is live, complete these five important steps:
- Go to
https://picsum.photos— the site currently uses random placeholder photos. - Take real photographs of your school campus, classrooms, students (with guardian consent), and staff.
- Replace the
https://picsum.photos/seed/...URLs in the HTML files with either:- Upload images to your
assets/images/folder and use relative paths, e.g.assets/images/campus-front.jpg - Or upload to a free image CDN like Cloudinary and use those URLs.
- Upload images to your
- Replace the SVG shield crest in the navigation with your actual school logo.
- Save your logo as
assets/logo.png(recommended size: 100×100px). - In
css/style.css, find.nav-crestand update it to show an<img>tag instead of the SVG.
- Log into your Supabase dashboard → Authentication → Users.
- Create accounts for your school admin, all teaching staff, and all students.
- For each user, set the correct
roleandstudent_idorsubjectin the user metadata (see Part 1, Step 7 above). - Communicate login credentials to students and staff securely.
- In Supabase → Table Editor →
students: Add your student records. - In Supabase → Table Editor →
staff: Add your staff records. - In Supabase → Table Editor →
announcements: Add real announcements that will appear in the ticker bar. Delete or update the sample data. - Update all the placeholder text in the HTML files with your school's real address, phone numbers, email addresses, and social media links.
- Open your website on a mobile phone (Android and iPhone if possible).
- Test: the ticker scrolls, the hamburger menu opens, the contact form submits, the portal login works with a real account.
- Once everything works, announce the website to parents via WhatsApp, SMS, and at the next school event.
- Consider printing the URL on your school letterhead, report cards, and notice boards.
| Problem | Solution |
|---|---|
| Contact form shows error | Check that your Supabase URL and anon key are correctly pasted in supabase-client.js. Check the browser console (F12 → Console) for error messages. |
| Login not working | Ensure the user account exists in Supabase Authentication → Users. Check that Email auth is enabled. |
| Images not loading | Check internet connection. picsum.photos requires internet access. For offline use, download images and save locally. |
| Ticker bar not moving | Check that main.js is loading correctly. Open browser console (F12) for errors. |
| Website looks broken on phone | Resize your browser window to test. If specific elements are broken, check the CSS media queries at the bottom of style.css. |
| RLS blocking data access | Double-check user metadata — the role field must be set correctly. Use Supabase logs (Dashboard → Logs) to see failed queries. |
| Component | Technology | Cost |
|---|---|---|
| Frontend | HTML5, CSS3, Vanilla JS | Free |
| Fonts | Google Fonts (Poppins + Merriweather) | Free |
| Images | picsum.photos (placeholders) | Free |
| Database | Supabase (PostgreSQL) | Free tier |
| Auth | Supabase Auth | Free tier |
| Hosting | Netlify | Free tier |
| Domain | .ng or .com.ng registrar | ~₦5,000–15,000/yr |
| SSL | Netlify auto-provision | Free |
Supabase Free Tier limits: 500MB database, 50,000 monthly active users, 2GB file storage. This is more than enough for a secondary school.
Netlify Free Tier limits: 100GB bandwidth/month, unlimited sites. More than sufficient.
Built for Greenfield Secondary School, Abuja, FCT, Nigeria. Last updated: 2024. Replace with your real school name before deployment.