Skip to content

krishnakamalbaishnab/Hello-Notes

Repository files navigation

HelloNotes - Student-Focused Note-Taking Application

A modern, distraction-free note-taking web application built with FastAPI, MongoDB, and Bootstrap. Designed specifically for students to organize their academic life efficiently.

πŸš€ Features

βœ… Core Features

  • User Authentication: Secure JWT-based authentication with registration and login
  • Email Verification: 6-digit code verification system for account security
  • Rich Note Creation: Create notes with titles, content, tags, and markdown formatting
  • Folder Organization: Organize notes into color-coded folders
  • To-Do Integration: Add task lists directly within notes
  • Important Notes: Mark crucial notes for quick access
  • Dark Mode: Toggle between light and dark themes
  • Responsive Design: Works seamlessly on desktop, tablet, and mobile

🎨 Enhanced UI/UX

  • Modern Bootstrap Design: Clean, professional interface
  • Rich Text Editor: Basic formatting (bold, italic, underline, links)
  • Interactive Elements: Hover effects, smooth transitions, and animations
  • Accessibility: Keyboard navigation and screen reader support
  • Print-Friendly: Optimized for printing notes

πŸ“± Student-Focused Features

  • Quick Stats Dashboard: Overview of notes, folders, and progress
  • Tag System: Categorize notes with custom tags
  • Search & Filter: Find notes quickly (coming soon)
  • Calendar Integration: Sync with Google Calendar (placeholder)
  • Image Upload: Add images to notes (coming soon)

πŸ› οΈ Technology Stack

  • Backend: FastAPI (Python)
  • Database: MongoDB
  • Frontend: Bootstrap 5 + Jinja2 Templates
  • Authentication: JWT with bcrypt password hashing
  • Styling: Custom CSS with dark mode support
  • Icons: Bootstrap Icons

πŸ“¦ Installation

Prerequisites

  • Python 3.8+
  • MongoDB (local or cloud)
  • pip (Python package manager)

Setup Instructions

  1. Clone the repository

    git clone <repository-url>
    cd HelloNotes
  2. Install dependencies

    pip install -r requirements.txt
  3. Configure environment variables Create a .env file in the root directory:

    MONGO_URI=your_mongodb_connection_string
    SECRET_KEY=your-secret-key-here
    ALGORITHM=HS256
    ACCESS_TOKEN_EXPIRE_MINUTES=30
    DATABASE_NAME=hellonotes
    
    # Email Configuration (for Gmail)
    MAIL_USERNAME=your-email@gmail.com
    MAIL_PASSWORD=your-app-password
    MAIL_FROM=your-email@gmail.com

    Email Setup Instructions:

    • For Gmail, you need to:
      1. Enable 2-factor authentication on your Google account
      2. Generate an App Password (not your regular password)
      3. Use the App Password in MAIL_PASSWORD
    • For other email providers, check their SMTP settings
  4. Run the application

    uvicorn main:app --reload --host 0.0.0.0 --port 8000
  5. Access the application Open your browser and navigate to http://localhost:8000

πŸ—οΈ Project Structure

HelloNotes/
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ db.py          # Database configuration
β”‚   └── settings.py    # Application settings
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ user.py        # User data models
β”‚   β”œβ”€β”€ note.py        # Note data models
β”‚   └── folder.py      # Folder data models
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ auth.py        # Authentication routes
β”‚   β”œβ”€β”€ note.py        # Note management routes
β”‚   └── folder.py      # Folder management routes
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html      # Base template
β”‚   β”œβ”€β”€ landing.html   # Landing page
β”‚   β”œβ”€β”€ dashboard.html # Main dashboard
β”‚   β”œβ”€β”€ auth/          # Authentication templates
β”‚   β”œβ”€β”€ notes/         # Note templates
β”‚   └── folders/       # Folder templates
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ styles.css     # Custom CSS
β”‚   └── uploads/       # File uploads directory
β”œβ”€β”€ utils/
β”‚   └── auth.py        # Authentication utilities
β”œβ”€β”€ main.py            # Main application file
β”œβ”€β”€ requirements.txt   # Python dependencies
└── README.md         # This file

πŸ”§ Configuration

Database Setup

The application uses MongoDB. You can use:

  • MongoDB Atlas (cloud): Free tier available
  • Local MongoDB: Install and run locally
  • Docker: Use MongoDB container

Security Settings

  • Change the SECRET_KEY in production
  • Use HTTPS in production
  • Configure proper CORS settings
  • Set up rate limiting

πŸš€ Deployment

Production Deployment

  1. Set up a production server (AWS, DigitalOcean, Heroku, etc.)
  2. Install dependencies: pip install -r requirements.txt
  3. Configure environment variables
  4. Set up a reverse proxy (Nginx recommended)
  5. Use a production ASGI server (Gunicorn + Uvicorn)
  6. Set up SSL certificates

Docker Deployment

FROM python:3.9-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .
EXPOSE 8000

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]

πŸ”’ Security Features

  • JWT Authentication: Secure token-based authentication
  • Password Hashing: bcrypt for secure password storage
  • Input Validation: Pydantic models for data validation
  • SQL Injection Protection: MongoDB with parameterized queries
  • XSS Protection: Jinja2 auto-escaping
  • CSRF Protection: Form-based protection

πŸ“Š Database Schema

Users Collection

{
  "_id": "ObjectId",
  "email": "string",
  "username": "string",
  "hashed_password": "string",
  "created_at": "datetime",
  "is_active": "boolean"
}

Notes Collection

{
  "_id": "ObjectId",
  "user_id": "string",
  "title": "string",
  "content": "string",
  "folder_id": "string",
  "tags": ["string"],
  "is_important": "boolean",
  "todos": [
    {
      "id": "string",
      "text": "string",
      "completed": "boolean",
      "created_at": "datetime"
    }
  ],
  "images": ["string"],
  "links": ["string"],
  "created_at": "datetime",
  "updated_at": "datetime"
}

Folders Collection

{
  "_id": "ObjectId",
  "user_id": "string",
  "name": "string",
  "description": "string",
  "color": "string",
  "created_at": "datetime",
  "updated_at": "datetime"
}

πŸ§ͺ Testing

Running Tests

# Install test dependencies
pip install pytest pytest-asyncio

# Run tests
pytest

Test Coverage

  • Unit tests for models and utilities
  • Integration tests for API endpoints
  • Frontend testing with Selenium (planned)

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Add tests for new functionality
  5. Commit your changes: git commit -am 'Add feature'
  6. Push to the branch: git push origin feature-name
  7. Submit a pull request

πŸ“ API Documentation

Once the application is running, visit:

  • Interactive API Docs: http://localhost:8000/docs
  • ReDoc Documentation: http://localhost:8000/redoc

🎯 Roadmap

Phase 2 Features

  • Advanced Search: Full-text search with filters
  • Image Upload: Drag-and-drop image support
  • Google Calendar Integration: Sync events with notes
  • Export Options: PDF, Markdown, and Word export
  • Collaboration: Share notes with other users
  • Mobile App: React Native mobile application

Phase 3 Features

  • AI Integration: Smart note suggestions
  • Voice Notes: Speech-to-text functionality
  • Offline Support: Progressive Web App features
  • Advanced Analytics: Study progress tracking
  • Plugin System: Extensible architecture

πŸ“„ License

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

πŸ™ Acknowledgments

  • FastAPI for the excellent web framework
  • Bootstrap for the responsive UI components
  • MongoDB for the flexible database solution
  • Bootstrap Icons for the beautiful icon set

πŸ“ž Support

For support and questions:


HelloNotes - Making student life more organized, one note at a time! πŸ“šβœ¨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors