A Django-based cloud notebook platform for managing personal learning notes and book searches with data visualization features.
- Create, edit, delete, and organize learning topics with detailed notes
- Search notes by content and topic with filtering capabilities
- Registration, login, password reset, and profile management
- Douban Integration: Search books with detailed information, ratings, and reviews
- Search History: Track and analyze user search behavior over time
- Data Visualization: Interactive charts showing search patterns and book rating distributions
- Recommendations: Book suggestions based on search history and preferences
- Bootstrap-based UI optimized for all devices
- Enhanced Django admin panel with SimpleUI
- Real-time book data collection using Selenium and BeautifulSoup
Category | Technology |
---|---|
Framework | Django 4.2.1 |
Database | MySQL |
Authentication | built-in auth system with custom user model |
Web Scraping | Selenium WebDriver + BeautifulSoup |
Data Visualization | Pygal |
Category | Technology |
---|---|
UI Framework | Bootstrap 3 |
Styling | Custom CSS with responsive design |
Charts | SVG-based interactive visualizations |
Templates | Django template system |
Category | Technology |
---|---|
WSGI Server | uWSGI |
Static Files | Django static files handling |
Database | MySQL with custom configurations |
- Python 3.8+
- MySQL 5.7+
- Chrome/Chromium browser (for web scraping)
- ChromeDriver
-
Clone the repository
git clone https://github.com/yourusername/AyeNote.git cd AyeNote
-
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install django==4.2.1 pip install mysqlclient pip install selenium pip install beautifulsoup4 pip install pygal pip install django-bootstrap3 pip install django-bootstrap4 pip install django-simpleui
-
Database setup
- Create a MySQL database named
Learning_Log
- Update database credentials in
ayenote/settings.py
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'Learning_Log', 'USER': 'your_username', 'PASSWORD': 'your_password', 'HOST': '127.0.0.1', 'PORT': '3306', } }
- Create a MySQL database named
-
Run migrations
python manage.py makemigrations python manage.py migrate
-
Create superuser
python manage.py createsuperuser
-
Install ChromeDriver
- Download ChromeDriver from https://chromedriver.chromium.org/
- Add ChromeDriver to your system PATH
-
Run the development server
python manage.py runserver
-
Access the application
- Open your browser and navigate to
http://127.0.0.1:8000
- Open your browser and navigate to
- Create a new user account or use the admin panel
- Start by creating topics for your learning areas
- Add detailed notes under each topic with rich text content
- Use the book search feature to find and analyze books
- Check your behavior analysis to see reading patterns
- Organize learning materials, search through content, edit or delete as needed
- Access Douban book database, view ratings and reviews, track search history
- Visualize search patterns, view rating distributions, get personalized recommendations
AyeNote/
├── ayenote/ # Main Django project
│ ├── settings.py # Project settings
│ ├── urls.py # Main URL configuration
│ └── wsgi.py # WSGI configuration
├── notes/ # Core application
│ ├── models.py # Data models (Topic, Entry, History)
│ ├── views.py # View functions
│ ├── forms.py # Django forms
│ ├── urls.py # App URL patterns
│ └── templates/ # HTML templates
├── users/ # User authentication app
│ ├── models.py # Custom user model
│ ├── views.py # Auth views
│ └── templates/ # Auth templates
├── static/ # Static files (CSS, images)
├── templates/ # Global templates
├── manage.py # Django management script
├── uwsgi.ini # uWSGI configuration
└── README.md # Project documentation
- DEBUG: Set to
False
in production - ALLOWED_HOSTS: Configure for your domain
- SECRET_KEY: Use a secure secret key in production
- Database: Configure MySQL connection settings
The project supports email functionality for password reset:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # Development
# Configure SMTP settings for production
Static files are configured to be served from multiple directories:
- Global static files:
/static/
- App-specific static files:
/learning_logs/static/
The application integrates with Douban's book search API to provide:
- Book information and metadata
- User ratings and reviews
- Related book recommendations
- Price information from various retailers
Uses Selenium WebDriver for dynamic content scraping:
- Book reviews and ratings
- User comments and interactions
- Real-time book availability and pricing
erDiagram
User {
int id PK
string username UK
string email UK
string password
string first_name
string last_name
string nickname
datetime date_joined
boolean is_active
boolean is_staff
boolean is_superuser
}
Topic {
int id PK
string text
datetime date_added
int owner_id FK
}
Entry {
int id PK
text text
datetime date_added
int topic_id FK
}
History {
int id PK
string search_term
int search_count
datetime last_searched
int user_id FK
}
User ||--o{ Topic : "owns"
Topic ||--o{ Entry : "contains"
User ||--o{ History : "tracks"
Model | Description | Key Fields |
---|---|---|
User | Extended Django user model | username , email , nickname , is_active |
Topic | Learning material categories | text , date_added , owner |
Entry | Individual notes and content | text , date_added , topic |
History | Search behavior tracking | search_term , search_count , user |
- User Isolation: Each user can only access their own topics, entries, and search history
- Hierarchical Organization: Topics organize entries in a structured manner
- Search Analytics: History model tracks user behavior for data visualization
- Referential Integrity: Foreign key relationships ensure data consistency
- CSRF Protection: Enabled by default
- User Authentication: Secure login/logout functionality
- Data Isolation: Users can only access their own data
- SQL Injection Protection: Django ORM provides protection
- XSS Protection: Template auto-escaping enabled
- Database Indexing: Optimized queries with proper indexes
- Static File Serving: Efficient static file handling
- Caching: Implement caching for frequently accessed data
- Image Optimization: Compressed images for faster loading
This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.
- Django for the robust web development platform
- Bootstrap for responsive UI components
- Pygal for data visualization capabilities
- Douban for book information API
Note: Please ensure compliance with website terms of service when using web scraping features.