A modern, full-stack notes application built with Next.js, Django, and PostgreSQL. Features infinite scrolling, real-time updates, and a beautiful, responsive interface.
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Python 3.11+ (for local development)
-
Clone the repository
git clone <your-repo-url> cd Notes
-
Start with Docker (Recommended)
docker compose -f docker-compose.dev.yml up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api/v1
- Admin Panel: http://localhost:8000/admin
-
Create a superuser
docker compose -f docker-compose.dev.yml exec backend python manage.py createsuperuser -
Seed the database (optional)
docker compose -f docker-compose.dev.yml exec backend python seed_data.py
Copy .env.example to .env and configure your settings:
cp .env.example .env- β Create, Edit, Delete Notes - Full CRUD operations with rich text content
- β Category Management - Organize notes with custom categories
- β Search & Filter - Find notes quickly with real-time search
- β Pin Notes - Mark important notes for quick access
- β Infinite Scrolling - Seamlessly browse through thousands of notes
- β Real-time Updates - Instant UI updates with optimistic updates
- π¨ Modern UI - Clean, responsive design with dark/light themes
- β‘ Fast Performance - Optimized for large datasets (10,000+ notes)
- π± Responsive Design - Works perfectly on desktop and mobile
- π Smooth Animations - Framer Motion animations for delightful interactions
- π― Intuitive Navigation - Easy-to-use interface with keyboard shortcuts
- π JWT Authentication - Secure user authentication and authorization
- π Pagination - Efficient data loading with backend pagination
- ποΈ Database Seeding - Pre-populated with realistic test data
- π³ Docker Support - Easy development and deployment setup
- π Production Ready - Optimized for both development and production
- Framework: Next.js 14 with App Router
- Styling: Tailwind CSS with shadcn/ui components
- State Management: React Query for server state, Zustand for client state
- Animations: Framer Motion for smooth transitions
- Authentication: JWT token-based authentication
- Framework: Django 5.1.5 with Django REST Framework
- Database: PostgreSQL with optimized queries
- Authentication: JWT (Simple JWT) for secure API access
- Caching: Redis for improved performance
- Pagination: Custom pagination for efficient data loading
- Database: PostgreSQL with connection pooling
- Cache: Redis for session and data caching
- Containerization: Docker and Docker Compose
- Development: Hot reload and automatic setup
Notes/
βββ client/ # Next.js frontend
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # Reusable UI components
β β βββ services/ # API service layer
β β βββ store/ # State management
β βββ package.json
βββ server/ # Django backend
β βββ config/ # Django settings and configuration
β βββ notes/ # Notes app with models, views, serializers
β βββ accounts/ # User authentication and management
β βββ requirements.txt # Python dependencies
β βββ seed_data.py # Database seeding script
βββ docker-compose.yml # Production Docker setup
βββ docker-compose.dev.yml # Development Docker setup
βββ README-Docker.md # Docker setup documentation
- Docker and Docker Compose
- Git
-
Clone the repository
git clone <repository-url> cd Notes
-
Start the development environment
docker compose -f docker-compose.dev.yml up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Admin Panel: http://localhost:8000/admin
- Username:
admin - Password:
admin123
- Login with the default credentials or create a new account
- Browse Notes - Your notes are automatically loaded with infinite scrolling
- Create Notes - Click the "+" button to create new notes
- Organize - Use categories to organize your notes
- Search - Use the search bar to find specific notes
- Pin Important Notes - Click the pin icon to mark important notes
- Scroll down to automatically load more notes
- No manual pagination required
- Optimized for large datasets
- Create custom categories with the "+" button
- See note counts for each category
- Filter notes by category
- Real-time search across titles and content
- Filter by categories
- Sort by date, title, or pinned status
- Rich text content with formatting
- Pin important notes to the top
- Edit and delete with confirmation dialogs
- Automatic saving
cd client
npm install
npm run devcd server
pip install -r requirements.txt
python manage.py runserver# Create migrations
python manage.py makemigrations
# Apply migrations
python manage.py migrate
# Seed database with test data
python manage.py shell < seed_data.py- Backend: Add models, serializers, and views in the appropriate Django app
- Frontend: Create components and update the API service layer
- Testing: Test with the seeded data (10,000+ notes)
docker compose -f docker-compose.dev.yml up --builddocker compose up --buildPOSTGRES_DB: Database namePOSTGRES_USER: Database userPOSTGRES_PASSWORD: Database passwordREDIS_URL: Redis connection URL
- Infinite Scrolling: Only loads visible notes + buffer
- Backend Pagination: Efficient database queries
- Redis Caching: Fast data retrieval
- Optimistic Updates: Instant UI feedback
- Lazy Loading: Components load as needed
- Database: Optimized for 10,000+ notes
- Caching: Redis for session and data caching
- Pagination: Handles large datasets efficiently
- Memory: Efficient data loading and cleanup
- Database: PostgreSQL with connection pooling
- Cache: Redis for improved performance
- Authentication: JWT with configurable expiration
- CORS: Configured for frontend communication
- API Base URL: Configurable via environment variables
- Theme: Dark/light mode support
- Animations: Framer Motion for smooth transitions
The application uses pytest with comprehensive test coverage for:
- API Endpoints - All REST API endpoints tested
- Authentication - User registration, login, and profile management
- Authorization - User access control and permissions
- Data Validation - Input validation and error handling
- Business Logic - Core application functionality
cd server
pip install -r requirements.txt# Using pytest (recommended)
pytest
# With coverage report
pytest --cov=. --cov-report=html
# Run specific test files
pytest notes/test_notes_api.py
pytest accounts/test_auth_api.py# Run only unit tests
pytest -m unit
# Run only integration tests
pytest -m integration
# Skip slow tests
pytest -m "not slow"- Notes API: 15+ test cases covering CRUD operations, pagination, search, and filtering
- Categories API: 12+ test cases covering category management and validation
- Authentication API: 18+ test cases covering registration, login, and profile management
- Authorization: Tests for user isolation and access control
- Edge Cases: Error handling, validation, and boundary conditions
The application comes with a comprehensive seeding script that creates:
- 10,000+ Notes with realistic content
- 20 Categories with proper note distribution
- Rich Content including meeting notes, research, and personal entries
- Meeting Notes: Professional meeting documentation
- Research: Academic and professional research notes
- Personal: Journal entries and personal thoughts
- Learning: Educational content and tutorials
POST /api/v1/auth/token/- LoginPOST /api/v1/auth/refresh/- Refresh tokenPOST /api/v1/auth/register/- User registration
GET /api/v1/notes/- List notes (paginated)POST /api/v1/notes/- Create noteGET /api/v1/notes/{id}/- Get note detailsPUT /api/v1/notes/{id}/- Update noteDELETE /api/v1/notes/{id}/- Delete note
GET /api/v1/categories/- List categoriesPOST /api/v1/categories/- Create categoryDELETE /api/v1/categories/{id}/- Delete category
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For issues and questions:
- Check the Docker setup documentation
- Review the API documentation
- Test with the seeded data
- Check the browser console for errors
Built with β€οΈ using Next.js, Django, and modern web technologies.


