- About The Project
- Key Features
- System Architecture
- Tech Stack
- Directory Structure
- Getting Started
- Environment Variables
- Contributing
- License
RoxyDental is a comprehensive SaaS solution designed to digitize dental clinic operations. Unlike traditional management systems, RoxyDental integrates Artificial Intelligence to assist doctors with predictions and provides a seamless experience for patients, nurses, and administrators.
The system is built as a Monorepo, separating the client (Next.js), server (Express.js), and AI processing unit (Python) to ensure scalability and maintainability.
- Smart Dashboard: Overview of daily appointments and financial stats.
- Digital EMR: Complete Electronic Medical Records with history tracking.
- Treatment Management: Record treatments, prescriptions, and notes.
- AI Assistant: Intelligent disease prediction and data analysis.
- Queue Management: Real-time patient queue handling.
- Vitals Recording: Pre-consultation checks (Blood pressure, etc.).
- Patient Registration: Streamlined new patient onboarding.
- Scheduling System: Conflict-free calendar for appointments.
- Finance & Billing: Automated invoicing and revenue tracking.
- Role-Based Access Control (RBAC): Secure access for different user roles.
The project follows a Microservices-like architecture:
- Frontend (
/frontend): Next.js App Router for UI/UX. - Backend (
/backend): Express.js REST API handling business logic and database interactions via Prisma. - AI Engine (
/roxydental-ai): Python-based service for machine learning predictions. - Database: PostgreSQL hosted on Supabase.
| Component | Technology | Description |
|---|---|---|
| Frontend | Next.js 14 | React Framework with App Router |
| Tailwind CSS | Utility-first CSS framework | |
| shadcn/ui | Reusable UI components | |
| TypeScript | Static typing for safety | |
| Backend | Express.js | Fast, unopinionated web framework for Node.js |
| Prisma | Next-generation Node.js and TypeScript ORM | |
| JWT | Secure Authentication | |
| Database | Supabase | Managed PostgreSQL & Storage |
| AI / ML | Python | For data processing and prediction models |
| DevOps | Docker | (Optional) Containerization |
RoxyDental/
βββ backend/ # Express.js API Server
β βββ prisma/ # Database Schema & Migrations
β βββ src/
β β βββ controllers/ # Request Handlers
β β βββ routes/ # API Endpoints
β β βββ services/ # Business Logic
β β βββ middlewares/ # Auth & Validation
β βββ ...
βββ frontend/ # Next.js Client Application
β βββ src/
β β βββ app/ # App Router Pages
β β βββ components/ # UI Components (shadcn)
β β βββ services/ # API Integration
β βββ ...
βββ roxydental-ai/ # Python AI Services
β βββ api.py # AI Endpoints
β βββ ...
βββ README.md
Follow these steps to run the complete system locally.
- Node.js (v18+)
- Python (v3.9+)
- PostgreSQL (or Supabase account)
- npm or yarn
- Create a project on Supabase.
- Get your Database Connection String (URI) and API Keys.
Navigate to the backend folder:
cd backend
Install dependencies:
npm install
Set up environment variables:
cp .env.example .env
# Edit .env and fill in DATABASE_URL, JWT_SECRET, SUPABASE_URL, etc.
Run Database Migrations (Prisma):
npx prisma migrate dev --name init
Start the Server:
npm run dev
# Server running at http://localhost:5000
Open a new terminal and navigate to the frontend:
cd frontend
Install dependencies:
npm install
Set up environment variables:
Create a .env.local file:
NEXT_PUBLIC_API_URL=http://localhost:5000/api/v1
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key
Start the Client:
npm run dev
# Client running at http://localhost:3000
Open a new terminal for the AI engine:
cd roxydental-ai
Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies (assuming requirements.txt exists, or install manually):
pip install flask scikit-learn pandas numpy
# Or if you have a requirements file: pip install -r requirements.txt
Start the AI Server:
python api.py
# AI Service likely running at http://localhost:8000 or 5001
Ensure you have the following variables configured in your .env files.
Backend (backend/.env):
PORT=5000
DATABASE_URL="postgresql://user:password@host:port/postgres?pgbouncer=true"
JWT_SECRET="your_super_secure_secret"
SUPABASE_URL="[https://your-project.supabase.co](https://your-project.supabase.co)"
SUPABASE_KEY="your-service-role-key"
Frontend (frontend/.env.local):
NEXT_PUBLIC_API_URL="http://localhost:5000/api/v1"