A cutting-edge full-stack web application for advanced time-series signal analysis using Fast Fourier Transform (FFT), multi-sinusoidal curve fitting, and machine learning techniques.
- FFT Analysis: Automatic frequency domain analysis to identify dominant frequencies
- Multi-Sinusoidal Curve Fitting: Sophisticated optimization using scipy algorithms
- Train/Test Validation: Intelligent data splitting with performance metrics
- Real-time Function Evaluation: Test fitted mathematical functions with custom inputs
- Advanced Mode: Customizable analysis parameters with noise filtering
- Synthetic Signal Generator: Create custom sinusoidal signals with multiple components
- Parameter Control: Fine-tune amplitude, frequency, phase, and DC offset
- Noise Simulation: Add configurable Gaussian noise for realistic testing
- Random Generation: AI-powered random parameter generation
- Visual Preview: Real-time visualization of generated signals
- Secure Registration: Email verification with professional templates
- Password Management: Reset functionality with secure token validation
- User Profiles: Customizable profiles with avatar upload
- Analysis Quotas: Configurable per-user analysis limits
- Session Management: Persistent analysis sessions for anonymous users
- Interactive Plots: High-quality matplotlib visualizations
- Multi-view Analysis: Frequency spectrum, original vs reconstructed, training vs testing
- Public Sharing: Share analyses with optional password protection
- Export Capabilities: Download results as CSV, images, or JSON
- Analysis History: Comprehensive browsing and management of past analyses
- Full-Stack Separation: Django REST API + React SPA
- Cloud Storage: AWS S3/Cloudflare R2 integration for scalability
- RESTful API: Complete API coverage for all features
- Responsive Design: Futuristic dark theme optimized for all devices
- Production Ready: Configured for deployment with PostgreSQL
The application implements a sophisticated signal analysis pipeline:
-
Data Preprocessing: Intelligent splitting into training (x < split_point) and testing (x ≥ split_point) sets
-
Frequency Analysis: Fast Fourier Transform to identify dominant frequency components
-
Model Fitting: Multi-sinusoidal regression of the form:
f(x) = Σᵢ Aᵢ * sin(2π * fᵢ * x + φᵢ) + DWhere:
Aᵢ= Amplitude of component ifᵢ= Frequency of component iφᵢ= Phase shift of component iD= DC offset (bias term)
-
Model Validation: Performance evaluation using Mean Squared Error (MSE) on test data
-
Prediction: Real-time function evaluation for new input values
- Python 3.11+ with pip
- Node.js 18+ with npm
- PostgreSQL 13+ (or SQLite for development)
- Git for version control
-
Clone the repository
git clone https://github.com/riteshnarayandas/signal-predictor.git cd signal-predictor/backend -
Create virtual environment
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Environment configuration
# Create .env file in backend/ directory cp .env.example .env # Edit .env with your configuration
-
Database setup
python manage.py makemigrations python manage.py migrate python manage.py createsuperuser
-
Start development server
python manage.py runserver
-
Navigate to frontend directory
cd ../frontend -
Install dependencies
npm install
-
Start development server
npm start
-
Access the application
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:8000/api/ - Admin Panel:
http://localhost:8000/admin/
- Frontend:
POST /api/auth/register/- User registration with email verificationPOST /api/auth/login/- User authenticationPOST /api/auth/logout/- Session terminationGET /api/auth/user/- Current user profilePOST /api/auth/change-password/- Password modificationPOST /api/auth/password-reset/- Password reset requestPOST /api/auth/password-reset-confirm/- Password reset confirmation
POST /api/upload/- CSV file upload and analysisPOST /api/evaluate/- Function evaluation at specific pointsGET /api/analyses/- List user's analysesGET /api/analyses/{id}/- Retrieve specific analysisPATCH /api/analyses/{id}/- Update analysis metadataDELETE /api/analyses/{id}/- Delete analysis
POST /api/generator/- Generate synthetic signalsGET /api/generator/presets/- Available generation presets
GET /api/analyses/{id}/share-options/- Get sharing configurationPOST /api/analyses/{id}/share-options/- Update sharing settingsGET /api/share/{id}/- Access shared analysisPOST /api/share/{id}/- Access password-protected analysis
GET /api/profile/- User profile dataPATCH /api/profile/- Update profile informationPOST /api/profile/avatar/- Upload profile picture
- Framework: Django 4.2.7 with Django REST Framework
- Database: PostgreSQL with psycopg2 adapter. Hosted on Neon.
- Authentication: Django's built-in auth + custom email verification
- File Storage: AWS S3 / Cloudflare R2 with django-storages
- Email: SMTP with HTML templates
- Task Queue: Django APScheduler for background tasks
- Signal Processing: NumPy, SciPy, scikit-learn
- Visualization: Matplotlib, Seaborn
- Data Handling: Pandas for CSV processing
- Machine Learning: Custom FFT analysis and curve fitting
- Framework: React 19.1.0 with React Router
- Styling: Bootstrap 5 + Custom CSS with futuristic theme
- Icons: Lucide React + Font Awesome
- HTTP Client: Axios for API communication
- State Management: React Context API
- Environment: Python-decouple for configuration
- CORS: django-cors-headers for frontend integration
- Security: CSRF protection, secure headers
- Monitoring: Custom error handling and logging
- 🌃 Futuristic Dark Theme: Custom-designed dark interface with neon accents
- ⚡ Smooth Animations: CSS3 transitions and hover effects
- 📱 Responsive Design: Optimized for desktop, tablet, and mobile
- 🎯 Intuitive Navigation: Clean, user-friendly interface
- 📊 Interactive Visualizations: High-quality charts and graphs
- 🔔 Toast Notifications: Real-time feedback for user actions
- Dashboard: Overview of recent analyses and statistics
- Upload Interface: Drag-and-drop file upload with preview
- Analysis Results: Comprehensive visualization suite
- Signal Generator: Interactive parameter configuration
- Profile Management: User settings and analysis history
- Sharing Hub: Collaboration and export features
Create a .env file in the backend/ directory:
# Django Configuration
SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
# Database Configuration (PostgreSQL)
DB_NAME=signal_predictor
DB_USER=your-db-user
DB_PASSWORD=your-db-password
DB_HOST=localhost
DB_PORT=5432
# Email Configuration
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=[email protected]
EMAIL_HOST_PASSWORD=your-app-password
DEFAULT_FROM_EMAIL=[email protected]
# Cloud Storage (AWS S3 / Cloudflare R2)
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_STORAGE_BUCKET_NAME=your-bucket-name
AWS_S3_REGION_NAME=us-east-1
AWS_S3_ENDPOINT_URL=https://your-endpoint.com
# Frontend Configuration
FRONTEND_BASE_URL=http://localhost:3000Made with ❤️ by Ritesh Narayan Das
Advanced Signal Analysis & Prediction Platform • June 2025
