Features β’ Demo β’ Quick Start β’ Tech Stack β’ Documentation β’ Contributing
- User Registration with email verification
- JWT-based Authentication with access & refresh tokens
- Token Rotation for enhanced security
- Password Reset via email
- Bcrypt Password Hashing
- Role-Based Access Control (RBAC) - User & Admin roles
- Full CRUD Operations - Create, Read, Update, Delete notes
- Visibility Levels:
- π Private - Only you can see
- π Public - Everyone can see
- π Unlisted - Only with link
- Draft Mode - Save work in progress
- Tagging System - Organize with tags
- Rich Text Support - Format your notes
- Search & Filter - Find notes quickly
- User Management Dashboard
- View all users
- Change user roles
- Activate/Deactivate accounts
- Audit Logging
- Track all system activities
- Monitor user actions
- View detailed logs with IP & User Agent
- System Statistics
- User metrics
- Activity tracking
- Real-time insights
- Ultra-Modern Design with glassmorphism effects
- Animated Backgrounds - Aurora & particle effects
- Smooth Animations - Framer Motion powered
- Dark/Light Mode support
- Responsive Design - Works on all devices
- Gradient Accents - Beautiful color schemes
- Interactive Components - Hover effects & micro-interactions
| Role | Password | |
|---|---|---|
| π Admin | [email protected] |
AdminPass123! |
| π€ User | [email protected] |
UserPass123! |
- Clone the repository
git clone https://github.com/atyakshev0405-star/Notes-SaaS-Application.git
cd Notes-SaaS-Application- Copy environment configuration
cp .env.example .env- Start the application
docker-compose up --build- Run database migrations
docker-compose exec backend alembic upgrade head- Access the application
- π Frontend: http://localhost:3000
- π§ Backend API: http://localhost:8000
- π API Documentation: http://localhost:8000/docs
- π§ MailHog (Email Testing): http://localhost:8025
That's it! The application is now running with demo accounts ready to use. π
- FastAPI - Modern Python web framework
- SQLAlchemy - SQL toolkit and ORM
- PostgreSQL - Relational database
- Redis - In-memory data store for tokens
- Alembic - Database migrations
- Pydantic - Data validation
- PyJWT - JWT implementation
- Bcrypt - Password hashing
- Pytest - Testing framework
- React 18 - UI library
- Vite - Build tool
- TailwindCSS - Utility-first CSS
- Framer Motion - Animation library
- React Router - Routing
- React Query - Data fetching
- Axios - HTTP client
- shadcn/ui - UI components
- Lucide Icons - Icon library
- Docker - Containerization
- Docker Compose - Multi-container orchestration
- MailHog - Email testing tool
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /auth/register |
Register new user | β |
| POST | /auth/verify-email/{token} |
Verify email address | β |
| POST | /auth/login |
User login | β |
| POST | /auth/refresh |
Refresh access token | β |
| POST | /auth/logout |
User logout | β |
| POST | /auth/forgot-password |
Request password reset | β |
| POST | /auth/reset-password |
Reset password with token | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /notes |
Get user's notes | β |
| POST | /notes |
Create new note | β |
| GET | /notes/{id} |
Get note by ID | β |
| PUT | /notes/{id} |
Update note | β |
| DELETE | /notes/{id} |
Delete note | β |
| GET | /notes/public |
Get all public notes | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /admin/users |
Get all users | β Admin |
| PUT | /admin/users/{id}/role |
Change user role | β Admin |
| PUT | /admin/users/{id}/status |
Activate/deactivate user | β Admin |
| GET | /admin/audit |
Get audit logs | β Admin |
Visit http://localhost:8000/docs for the full interactive Swagger UI documentation.
# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run migrations
alembic upgrade head
# Start development server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev# Run all tests
docker-compose exec backend pytest
# Run with coverage
docker-compose exec backend pytest --cov=app --cov-report=html
# Run specific test file
docker-compose exec backend pytest app/tests/test_auth.py# Run tests
docker-compose exec frontend npm test
# Run tests in watch mode
docker-compose exec frontend npm test -- --watch# Create a new migration
docker-compose exec backend alembic revision --autogenerate -m "Description"
# Apply migrations
docker-compose exec backend alembic upgrade head
# Rollback migration
docker-compose exec backend alembic downgrade -1Notes-SaaS-Application/
βββ π backend/ # FastAPI Backend
β βββ π app/
β β βββ π api/ # API Routes
β β β βββ __init__.py
β β β βββ auth.py # Authentication endpoints
β β β βββ notes.py # Notes CRUD endpoints
β β β βββ admin.py # Admin endpoints
β β β βββ deps.py # Dependencies
β β βββ π core/ # Core Configuration
β β β βββ config.py # Settings
β β β βββ security.py # JWT & Security
β β βββ π db/ # Database
β β β βββ session.py # DB Session
β β β βββ init_db.py # DB Initialization
β β β βββ π migrations/ # Alembic Migrations
β β βββ π models/ # SQLAlchemy Models
β β β βββ user.py
β β β βββ note.py
β β β βββ audit_log.py
β β βββ π schemas/ # Pydantic Schemas
β β β βββ auth.py
β β β βββ user.py
β β β βββ note.py
β β β βββ audit_log.py
β β βββ π services/ # Business Logic
β β β βββ auth.py
β β β βββ email.py
β β β βββ audit.py
β β βββ π tests/ # Tests
β β β βββ conftest.py
β β β βββ test_auth.py
β β β βββ test_notes.py
β β βββ main.py # FastAPI App
β βββ Dockerfile
β βββ requirements.txt
β βββ alembic.ini
β
βββ π frontend/ # React Frontend
β βββ π src/
β β βββ π components/ # Reusable Components
β β β βββ Navbar.jsx
β β β βββ ProtectedRoute.jsx
β β β βββ π ui/ # UI Components
β β βββ π pages/ # Page Components
β β β βββ Login.jsx
β β β βββ Register.jsx
β β β βββ NotesList.jsx
β β β βββ NoteEditor.jsx
β β β βββ AdminPanel.jsx
β β β βββ AuditLog.jsx
β β βββ π hooks/ # Custom Hooks
β β β βββ useAuth.jsx
β β βββ π contexts/ # React Contexts
β β β βββ ThemeContext.jsx
β β βββ π lib/ # Utilities
β β β βββ utils.js
β β βββ App.jsx
β β βββ main.jsx
β β βββ index.css
β βββ Dockerfile
β βββ package.json
β βββ vite.config.js
β βββ tailwind.config.js
β
βββ π screenshots/ # Application Screenshots
βββ docker-compose.yml # Docker Compose Configuration
βββ .env.example # Environment Variables Template
βββ .gitignore # Git Ignore Rules
βββ LICENSE # MIT License
βββ CONTRIBUTING.md # Contribution Guidelines
βββ README.md # This File
- β Password Hashing - Bcrypt with salt
- β JWT Authentication - Access & Refresh tokens
- β Token Rotation - Automatic refresh token rotation
- β RBAC - Role-based access control
- β Input Validation - Pydantic schemas
- β CORS Protection - Configured origins
- β SQL Injection Prevention - SQLAlchemy ORM
- β XSS Protection - React's built-in protection
- β Audit Logging - Track all sensitive operations
- β Email Verification - Confirm user emails
- β Rate Limiting - Redis-based (ready for production)
We welcome contributions! Please see our Contributing Guidelines for details.
- π΄ Fork the repository
- πΏ Create a feature branch (
git checkout -b feature/amazing-feature) - π» Make your changes
- β Run tests
- π Commit your changes (
git commit -m 'Add amazing feature') - π Push to the branch (
git push origin feature/amazing-feature) - π Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- FastAPI for the amazing Python framework
- React for the powerful UI library
- TailwindCSS for the utility-first CSS framework
- shadcn/ui for beautiful UI components
- Framer Motion for smooth animations
For questions or support, please open an issue on GitHub.
β Star us on GitHub β it motivates us a lot!



