Loading repository data…
Loading repository data…
HardikQuantumCybernetic / repository
A modern, full-stack dental clinic management system built with React, TypeScript, and Supabase. Features patient management, appointment scheduling, financial tracking, WhatsApp integration, AI chatbot, and comprehensive admin dashboard. Includes , role-based authentication via Clerk, and real-time updates.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A modern, full-stack dental clinic management system built with React, TypeScript, and Supabase. This open-source application provides comprehensive patient management, appointment scheduling, feedback collection, and administrative tools for dental practices.
🌟 Star this repo if you find it useful! Your support helps us improve and maintain this project.
Before you begin, ensure you have the following installed:
git clone https://github.com/HardikQuantumCybernetic/hardik-dental.git
cd hardik-dental
Using npm:
npm install
Using bun:
bun install
hardik-dentalhttps://xxxxx.supabase.co)eyJ...)Open src/integrations/supabase/client.ts and update the credentials:
const SUPABASE_URL = "YOUR_SUPABASE_PROJECT_URL";
const SUPABASE_PUBLISHABLE_KEY = "YOUR_SUPABASE_ANON_KEY";
npm install -g supabase
supabase login
supabase link --project-ref YOUR_PROJECT_REF
supabase db push
Alternatively, you can manually run the SQL migrations from docs/supabase-schema.sql:
docs/supabase-schema.sqlThe database includes these tables:
patients - Patient informationappointments - Appointment schedulingdoctors - Doctor profilesservices - Available servicespatient_services - Patient treatment trackingpatient_financials - Financial recordsfeedback - Patient feedback and messagestreatments - Treatment recordsuser_roles - Role-based access controlsrc/main.tsx:const PUBLISHABLE_KEY = 'YOUR_CLERK_PUBLISHABLE_KEY';
Configure authentication providers in Clerk:
Set up redirect URLs in Clerk:
http://localhost:8080For Supabase Edge Functions, you may need to set up secrets:
supabase secrets set OPENAI_API_KEY=your_key_here
supabase secrets set CLERK_SECRET_KEY=your_key_here
npm run dev
The application will be available at http://localhost:8080
npm run build
This creates an optimized production build in the dist directory.
npm run preview
npm install -g netlify-cli
netlify login
netlify init
Configure Build Settings:
npm run builddistDeploy:
netlify deploy --prod
npm install -g vercel
vercel
Configure Project:
npm run builddistSet Environment Variables:
npm install --save-dev gh-pages
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
}
export default defineConfig({
base: '/hardik-dental/',
// ... other config
});
npm run deploy
FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY netlify.toml /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
docker build -t hardik-dental .
docker run -p 80:80 hardik-dental
npm run builddist folder to your web hostindex.html for all routes (SPA routing)Example Apache .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Example Nginx configuration:
server {
listen 80;
server_name yourdomain.com;
root /var/www/hardik-dental;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
The project includes RLS policies for data security. Ensure they're enabled:
The admin panel uses Supabase authentication with role-based access control. Follow these steps to create an admin account:
admin@yourdomain.com)-- Replace 'YOUR_USER_ID_HERE' with the actual user ID copied from Step 1
INSERT INTO user_roles (user_id, role)
VALUES ('YOUR_USER_ID_HERE', 'admin');
Example:
INSERT INTO user_roles (user_id, role)
VALUES ('a1b2c3d4-e5f6-7890-abcd-ef1234567890', 'admin');
https://yourdomain.com/admin)To verify an admin user exists, run:
SELECT ur.*, au.email
FROM user_roles ur
JOIN auth.users au ON ur.user_id = au.id
WHERE ur.role = 'admin';
To revoke admin access:
DELETE FROM user_roles
WHERE user_id = 'USER_ID_HERE' AND role = 'admin';
The application implements production-grade API security:
All API endpoints are protected with rate limiting to prevent abuse:
RATE_LIMIT_MAX_REQUESTS: Maximum requests per window (default: 100)RATE_LIMIT_WINDOW_MS: Time window in milliseconds (default: 60000)X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-ResetRetry-After header