Skip to content

Main Application Dashboard for use in a Mono-Repo Environment; used as main landing UI Shell for linkage to other applications. Has OTP Security

Notifications You must be signed in to change notification settings

shawnmcrowley/dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

API Dashboard

A modern, responsive dashboard application for managing and monitoring API integrations with AdaptiveWorks, MongoDB, and Snowflake data sources.

๐Ÿ—๏ธ Architecture Overview

This project demonstrates a production-ready Next.js application with:

  • Next.js 16: Modern React framework with App Router
  • MongoDB: NoSQL database for flexible data storage
  • AdaptiveWorks API: Real-time project management data integration
  • AG Grid: Advanced data grid for displaying and filtering results
  • PWA Support: Progressive Web App with offline capabilities

๐Ÿš€ Features

Authentication

  • OTP Login: Secure one-time password authentication
  • Environment-based: Configurable OTP via environment variables
  • Alert Dialog: User-friendly error handling

Data Integration

  • AdaptiveWorks: Real-time milestone tracking and management
  • MongoDB: NoSQL data store with advanced filtering
  • Snowflake: Data warehouse analytics (placeholder)

User Interface

  • Responsive Design: Mobile-first with hamburger menu
  • Card-based Dashboard: Intuitive project navigation
  • Data Grids: Sortable, filterable tables with pagination
  • PWA Ready: Installable app with service worker

๐Ÿ› ๏ธ Technology Stack

Frontend

  • Next.js 16: App Router with React 19
  • Tailwind CSS: Utility-first styling
  • shadcn/ui: High-quality UI components
  • AG Grid: Enterprise data grid

Backend

  • MongoDB: Document database
  • Winston: Structured logging
  • Next.js API Routes: RESTful endpoints

UI Components

  • Input OTP: One-time password input
  • Alert Dialog: Modal dialogs
  • Card: Content containers
  • Button: Interactive elements

๐Ÿ“ Project Structure

dashboard/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ adaptiveworks/    # AdaptiveWorks API endpoint
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mongodb/          # MongoDB API endpoint
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ sync/             # Data sync endpoint
โ”‚   โ”‚   โ”œโ”€โ”€ adaptiveworks/        # AdaptiveWorks page
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/            # Main dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ mongodb/              # MongoDB page
โ”‚   โ”‚   โ”œโ”€โ”€ snowflake/            # Snowflake page
โ”‚   โ”‚   โ”œโ”€โ”€ lib/                  # Utilities and DB connection
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css           # Global styles
โ”‚   โ”‚   โ”œโ”€โ”€ layout.js             # Root layout
โ”‚   โ”‚   โ”œโ”€โ”€ logger.js             # Winston logger
โ”‚   โ”‚   โ””โ”€โ”€ page.js               # Login page
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ ui/                   # shadcn/ui components
โ”‚   โ”‚   โ”œโ”€โ”€ header.js             # App header
โ”‚   โ”‚   โ”œโ”€โ”€ footer.js             # App footer
โ”‚   โ”‚   โ”œโ”€โ”€ landing.js            # Page wrapper
โ”‚   โ”‚   โ””โ”€โ”€ ServiceWorkerRegistration.js
โ”‚   โ””โ”€โ”€ lib/
โ”‚       โ””โ”€โ”€ utils.js              # Utility functions
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ manifest.json             # PWA manifest
โ”‚   โ”œโ”€โ”€ sw.js                     # Service worker
โ”‚   โ””โ”€โ”€ LycraLogo.png             # Logo
โ”œโ”€โ”€ .env.local                    # Environment variables
โ””โ”€โ”€ package.json

๐Ÿ”ง Development Setup

Prerequisites

  • Node.js 18.17 or later
  • MongoDB instance
  • AdaptiveWorks API key

Installation

  1. Clone the repository

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

    npm install --legacy-peer-deps
  3. Configure environment variables

    Create .env.local:

    MONGODB_URI=mongodb://localhost:27017/
    ADAPTIVE_WORKS_API_KEY=<your-api-key>
    SERVER_URL=http://localhost:3000
    NEXT_PUBLIC_OTP=123456
    NEXT_PUBLIC_NODE_ENV=development
  4. Run development server

    npm run dev
  5. Open application

    Navigate to http://localhost:3000

Building for Production

npm run build
npm start

๐ŸŽฏ Key Features

OTP Authentication

  • Secure login with configurable OTP
  • Environment-based configuration
  • Error handling with alert dialogs

Data Visualization

  • AG Grid Integration: Advanced filtering and sorting
  • Pagination: 25/50 rows per page
  • Date Filters: Column-specific date filtering
  • Real-time Data: Live API integration

Progressive Web App

  • Service Worker: Enabled in production mode
  • Manifest: App installation support
  • Offline Support: Cached resources
  • Mobile Optimized: Responsive design

API Endpoints

  • POST /api/adaptiveworks - Fetch AdaptiveWorks milestones
  • GET /api/mongodb - Retrieve MongoDB data
  • POST /api/sync - Synchronize data sources

๐Ÿš€ Deployment

Environment Variables

Set in production:

NEXT_PUBLIC_NODE_ENV=production
NEXT_PUBLIC_OTP=<secure-otp>
MONGODB_URI=<production-mongodb-uri>
ADAPTIVE_WORKS_API_KEY=<production-api-key>

Vercel Deployment

  1. Push code to GitHub
  2. Import repository in Vercel
  3. Configure environment variables
  4. Deploy

Docker Deployment

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production --legacy-peer-deps
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

๐Ÿ”ฎ Roadmap

Completed โœ…

  • OTP authentication
  • AdaptiveWorks API integration
  • MongoDB data storage
  • Responsive UI with hamburger menu
  • PWA support with service worker
  • Data grids with filtering/sorting
  • Environment-based configuration

In Progress ๐Ÿšง

  • Snowflake integration
  • Real-time data synchronization
  • Enhanced error handling

Planned ๐Ÿ“‹

  • GitHub Actions CI/CD
  • Loading spinners and toasts
  • Error and loading pages
  • Swagger API documentation
  • SSL certificate setup
  • Advanced analytics dashboard

๐Ÿ“š Resources

๐Ÿ“ License

This project is licensed under the MIT License.

๐Ÿ“ง Contact

Shawn M. Crowley


Built with โค๏ธ using Next.js 16 and MongoDB

About

Main Application Dashboard for use in a Mono-Repo Environment; used as main landing UI Shell for linkage to other applications. Has OTP Security

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published