WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Full-stack SaaS note-taking app with JWT authentication, role-based access control, and rich text editor. Built with FastAPI, React, PostgreSQL, and Redis. Features email verification, audit logging, and modern glassmorphism UI.

License

Notifications You must be signed in to change notification settings

atyakshev0405-star/Notes-SaaS-Application

Repository files navigation

Notes App Logo

πŸ“ Notes SaaS Application

A Modern, Production-Ready Full-Stack Notes Management Platform

License: MIT FastAPI React Docker

Features β€’ Demo β€’ Quick Start β€’ Tech Stack β€’ Documentation β€’ Contributing


✨ Features

πŸ” Authentication & Security

  • 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

πŸ“„ Notes Management

  • 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

πŸ‘¨β€πŸ’Ό Admin Features

  • 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

🎨 Modern UI/UX

  • 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

πŸ–ΌοΈ Demo

Screenshots

Login Page Register Page Notes List Admin Panel

Demo Accounts

Role Email Password
πŸ‘‘ Admin [email protected] AdminPass123!
πŸ‘€ User [email protected] UserPass123!

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the repository
git clone https://github.com/atyakshev0405-star/Notes-SaaS-Application.git
cd Notes-SaaS-Application
  1. Copy environment configuration
cp .env.example .env
  1. Start the application
docker-compose up --build
  1. Run database migrations
docker-compose exec backend alembic upgrade head
  1. Access the application

That's it! The application is now running with demo accounts ready to use. πŸŽ‰

πŸ› οΈ Tech Stack

Backend

Frontend

DevOps

πŸ“š Documentation

API Endpoints

Authentication (/auth)

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 ❌

Notes (/notes)

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 ❌

Admin (/admin)

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

Interactive API Documentation

Visit http://localhost:8000/docs for the full interactive Swagger UI documentation.

πŸ’» Development

Local Development Setup

Backend Development

# 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

Frontend Development

# Navigate to frontend directory
cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

Running Tests

Backend Tests

# 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

Frontend Tests

# Run tests
docker-compose exec frontend npm test

# Run tests in watch mode
docker-compose exec frontend npm test -- --watch

Database Migrations

# 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 -1

πŸ“ Project Structure

Notes-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

πŸ”’ Security Features

  • βœ… 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)

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Quick Contribution Steps

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. πŸ’» Make your changes
  4. βœ… Run tests
  5. πŸ“ Commit your changes (git commit -m 'Add amazing feature')
  6. πŸš€ Push to the branch (git push origin feature/amazing-feature)
  7. πŸŽ‰ Open a Pull Request

πŸ“ License

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

πŸ™ Acknowledgments

πŸ“§ Contact

For questions or support, please open an issue on GitHub.


Made with ❀️ by the Notes SaaS Team

⭐ Star us on GitHub β€” it motivates us a lot!

About

Full-stack SaaS note-taking app with JWT authentication, role-based access control, and rich text editor. Built with FastAPI, React, PostgreSQL, and Redis. Features email verification, audit logging, and modern glassmorphism UI.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published