A comprehensive full-stack web application built with Next.js (frontend) and FastAPI (backend) featuring authentication, role-based access control, and template management.
- Next.js 14 with App Router and TypeScript
- Tailwind CSS for styling
- Shadcn UI components
- React Hook Form + Zod for form validation
- TanStack React Query v5 for API state management
- Feature-centric folder structure for better organization
- FastAPI with Pydantic models
- MongoDB with Motor (async driver)
- JWT authentication with refresh tokens
- Role-based access control (admin, user)
- JWT-based authentication with refresh tokens
- Role-based routing (admin/user)
- Session management with device tracking
- Email verification system
- Password reset functionality
- Template upload (image, title, description)
- Template management (list, delete)
- Role and permission management
- Session monitoring
- View admin-uploaded templates
- Screenshot protection with payment redirect
- Session management
- HTTP-only cookies for JWT storage
- Route protection middleware
- Screenshot attempt detection
- Right-click and developer tools blocking
- Node.js 18+ and npm
- Python 3.8+
- MongoDB instance
- Git
- Please refer to QUICK_START.md to setup your environment.
The screenshot protection feature can be tested in several ways:
- Print Screen Key: Press
PrtScnorFn + PrtScn - Snipping Tool: Try to use Windows Snipping Tool or similar
- Browser Developer Tools: Press
F12orCtrl+Shift+I - Right-click: Right-click on protected content
When any of these actions are detected, the user will be redirected to the payment page.
- User signs up with email
- Email verification required
- User signs in and receives JWT tokens
- Tokens stored in HTTP-only cookies
- Refresh token mechanism for seamless experience
- Session tracking with device information
POST /api/auth/signup- User registrationPOST /api/auth/signin- User loginPOST /api/auth/verify-email- Email verificationPOST /api/auth/forgot- Password reset requestPOST /api/auth/reset-password- Password resetGET /api/auth/details- Get user detailsPOST /api/auth/refresh-token- Refresh JWT tokenPOST /api/auth/logout- LogoutGET /api/auth/sessions- List user sessionsDELETE /api/auth/sessions- Logout from all devicesDELETE /api/auth/sessions/{sessionId}- Logout specific sessionGET /api/auth/sessions/stats- Session statistics
GET /api/templates- Get all templates (public)POST /api/templates- Upload template (admin only)DELETE /api/templates/{id}- Delete template (admin only)
- Deploy to platforms like Railway, Render, or Heroku
- Set environment variables in deployment platform
- Ensure MongoDB connection string is properly configured
- Deploy to Vercel, Netlify, or similar platforms
- Set environment variables for API URL
- Configure CORS settings in backend for production domain
- The application uses feature-centric architecture for better maintainability
- JWT tokens are stored in HTTP-only cookies for security
- Session management includes device tracking
- Screenshot protection is implemented using multiple detection methods
- Role-based access control is enforced at both frontend and backend levels
- But still we cannot prevent all forms of screen capture or image manipulation.
- Backend runs on
http://localhost:8000 - Frontend runs on
http://localhost:3000 - MongoDB should be running locally or use a cloud instance
- API documentation available at
http://localhost:8000/docswhen backend is running