Skip to content

IRAGAME/Safeanesthesia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

91 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SafeAnesthesia

Node.js CI License: MIT Vercel Render

A continuing medical education platform for anesthesia professionals across Africa, built for SPOOA-PM Africa.

Features

  • πŸ“š Browse and access medical training modules
  • πŸ” Admin panel with JWT authentication
  • πŸ“ CRUD management for training formations
  • πŸ“§ Contact form with email notifications
  • πŸ–ΌοΈ Image upload and management via Supabase Storage
  • πŸ“± Responsive design for desktop and mobile
  • πŸ”’ Security-focused with Helmet and rate limiting

Tech Stack

Layer Technology
Frontend HTML5, CSS3, JavaScript (Vanilla)
Backend Node.js, Express 5 (ES Modules)
Database Supabase (PostgreSQL)
Storage Supabase Storage
Auth JWT (JSON Web Tokens)
Email Nodemailer (SMTP)
Deployment Vercel (Frontend), Render (Backend)

Getting Started

Prerequisites

  • Node.js >= 18
  • A Supabase account (free tier works)
  • An SMTP email provider

Installation

# Clone the repository
git clone https://github.com/IRAGAME/Safeanesthesia.git
cd Safeanesthesia

# Install backend dependencies
cd backend
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your configuration

Environment Variables

PORT=5000
ADMIN_PASSWORD=your_secure_password
JWT_SECRET=your_jwt_secret
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SMTP_HOST=your_smtp_host
SMTP_PORT=587
SMTP_USER=your_smtp_user
SMTP_PASS=your_smtp_password
CORS_ORIGIN=https://safeanesthesia.vercel.app
STORAGE_TYPE=external

Run Locally

# Start backend
cd backend
node server.js

# Open frontend (serve with any static server)
cd frontend
npx serve .

API Documentation

Method Endpoint Description Auth
GET /api/formations List all formations No
GET /api/formations/:id Get formation by ID No
POST /api/auth/login Admin login No
GET /api/auth/verify Verify JWT token Yes
POST /api/admin/formations Create formation Yes
PUT /api/admin/formations/:id Update formation Yes
DELETE /api/admin/formations/:id Delete formation Yes
POST /send Submit contact form No

Project Structure

β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ server.js          # Express server entry point
β”‚   β”œβ”€β”€ cors.js            # CORS configuration
β”‚   β”œβ”€β”€ storage.js         # Supabase storage client
β”‚   β”œβ”€β”€ supabase.js        # Supabase database client
β”‚   └── .env.example       # Environment variables template
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html         # Home page
β”‚   β”œβ”€β”€ about.html         # About page
β”‚   β”œβ”€β”€ contact.html       # Contact page
β”‚   β”œβ”€β”€ login.html         # Admin login
β”‚   β”œβ”€β”€ admin.html         # Admin dashboard
β”‚   β”œβ”€β”€ formation.html     # Formation detail page
β”‚   β”œβ”€β”€ formations.html    # Formations listing
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css      # Stylesheet
β”‚   └── js/                # JavaScript modules
β”‚       β”œβ”€β”€ config.js
β”‚       β”œβ”€β”€ index.js
β”‚       β”œβ”€β”€ admin.js
β”‚       β”œβ”€β”€ formation.js
β”‚       β”œβ”€β”€ formations.js
β”‚       └── script.js
β”œβ”€β”€ .gitignore
└── README.md

Deployment

Roadmap

  • Unit and integration tests
  • Internationalization (FR/EN)
  • User registration for learners
  • Progress tracking and certificates
  • Video content support
  • Offline access via PWA

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ for SPOOA-PM Africa

About

Medical web application for continuing education of anesthesia professionals across Africa. Built with Node.js, Supabase, and vanilla JS.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors