Skip to content

1234-ad/deepq-ai-dashboard

Repository files navigation

DeepQ-AI Dashboard - Full Stack Developer Intern Assignment

An interactive Django web application that displays World Bank data through dynamic charts and graphs.

πŸš€ Features

Dashboard Features

  • Interactive Charts: Line charts, bar charts, and area charts using Chart.js
  • Dynamic Data: Real-time data fetching from World Bank Open Data API
  • Filtering System: Filter by countries, date ranges, and categories
  • Responsive Design: Mobile-friendly Bootstrap interface

Authentication

  • Django built-in authentication system
  • Login/logout functionality
  • Protected dashboard access for authenticated users only

Data Visualization

  1. GDP Trends (Line Chart): Shows GDP over time for selected countries
  2. Population Comparison (Bar Chart): Compares population across countries
  3. CO2 Emissions (Area Chart): Environmental data visualization over time

πŸ› οΈ Technology Stack

  • Backend: Django 4.2.7, Django REST Framework
  • Frontend: HTML5, CSS3, JavaScript, Bootstrap 5, Chart.js
  • Database: SQLite (development), PostgreSQL (production)
  • API: World Bank Open Data API
  • Deployment: Heroku/Render ready

πŸ“Š Data Source

World Bank Open Data

  • URL: https://data.worldbank.org/
  • Indicators Used:
    • GDP (Current US$): NY.GDP.MKTP.CD
    • Population Total: SP.POP.TOTL
    • CO2 Emissions: EN.ATM.CO2E.KT

πŸš€ Quick Start

Local Development

  1. Clone the repository

    git clone https://github.com/1234-ad/deepq-ai-dashboard.git
    cd deepq-ai-dashboard
  2. Create virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up environment variables

    cp .env.example .env
    # Edit .env with your settings
  5. Run migrations

    python manage.py migrate
  6. Create superuser

    python manage.py createsuperuser
  7. Run development server

    python manage.py runserver
  8. Access the application

Demo Credentials

  • Username: admin
  • Password: admin123

🌐 Deployment

Heroku Deployment

  1. Install Heroku CLI

  2. Login to Heroku

    heroku login
  3. Create Heroku app

    heroku create your-app-name
  4. Set environment variables

    heroku config:set SECRET_KEY=your-secret-key
    heroku config:set DEBUG=False
  5. Deploy

    git push heroku main
  6. Run migrations

    heroku run python manage.py migrate
    heroku run python manage.py createsuperuser

Alternative Deployment Options

  • Render: Connect GitHub repo and deploy
  • Vercel: For static frontend deployment
  • Netlify: For static site hosting
  • Railway: Simple deployment platform

πŸ“ Project Structure

deepq-ai-dashboard/
β”œβ”€β”€ dashboard_project/          # Django project settings
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py
β”‚   └── wsgi.py
β”œβ”€β”€ dashboard/                  # Main Django app
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ admin.py
β”‚   β”œβ”€β”€ apps.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ urls.py
β”‚   └── views.py
β”œβ”€β”€ templates/                  # HTML templates
β”‚   β”œβ”€β”€ base.html
β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   └── dashboard.html
β”‚   └── registration/
β”‚       └── login.html
β”œβ”€β”€ static/                     # Static files (CSS, JS, images)
β”œβ”€β”€ requirements.txt            # Python dependencies
β”œβ”€β”€ manage.py                   # Django management script
β”œβ”€β”€ Procfile                    # Heroku deployment
β”œβ”€β”€ runtime.txt                 # Python version
└── README.md                   # Project documentation

πŸ”§ API Endpoints

  • GET /api/gdp-data/ - GDP data with country and year filters
  • GET /api/population-data/ - Population data with filters
  • GET /api/co2-data/ - CO2 emissions data with filters

Query Parameters

  • countries: Semicolon-separated country codes (e.g., US;CN;IN)
  • start_year: Start year for data range
  • end_year: End year for data range

🎨 Features Implemented

βœ… Required Features

  • Django backend with REST API
  • Interactive dashboard with multiple chart types
  • Dynamic data fetching from backend
  • Filtering system (countries, date ranges)
  • User authentication (login/logout)
  • Protected dashboard access
  • World Bank Open Data integration
  • Deployment ready

βœ… Additional Features

  • Responsive design
  • Loading indicators
  • Error handling
  • Professional UI/UX
  • Multiple chart types (Line, Bar, Area)
  • Real-time data updates
  • Admin interface
  • Documentation

πŸ”’ Security Features

  • CSRF protection
  • User authentication required
  • Secure session management
  • Environment variable configuration
  • SQL injection protection (Django ORM)

πŸ“± Browser Compatibility

  • Chrome (recommended)
  • Firefox
  • Safari
  • Edge
  • Mobile browsers

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

πŸ“„ License

This project is created for the DeepQ-AI Full Stack Developer Intern assignment.

πŸ‘¨β€πŸ’» Developer

Created by: Your Name

  • GitHub: @1234-ad
  • Assignment: DeepQ-AI Full Stack Developer Intern Position

πŸ“ž Support

For any questions or issues, please create an issue in the GitHub repository.


Assignment Completion Date: August 25, 2025 Company: DeepQ-AI Position: Full Stack Developer Intern

About

Interactive Django dashboard with World Bank data visualization - DeepQ-AI Full Stack Developer Intern Assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published