Skip to content

Ascendara/webview

Repository files navigation

Ascendara Logo

Ascendara Monitor

Last Commit Website License

πŸ“¦ About

Ascendara Monitor is a mobile-first web application that acts as a remote monitoring and control companion for Ascendara downloads. Built with Next.js, TypeScript, and Tailwind CSS, it provides a seamless experience for managing your downloads from anywhere.

✨ Key Features

  • 6-Digit Connection Code: Secure connection to Ascendara desktop app using a simple 6-digit code
  • End-to-End Encryption: All communications are encrypted end-to-end on the production webview at webview.ascendara.app
  • Real-time Download Monitoring: View active, paused, completed, and failed downloads
  • Download Controls: Pause, resume, and cancel downloads remotely
  • Auto-refresh: Downloads update automatically every 30 seconds
  • Mobile-first Design: Optimized for mobile devices with responsive layout
  • Theme Customization: Multiple theme options with dark mode support
  • PWA Support: Install as a Progressive Web App on mobile devices
  • Modern UI: Built with shadcn/ui components and Tailwind CSS

πŸ”§ Tech Stack

  • Framework: Next.js 16 with App Router
  • Language: TypeScript
  • Styling: Tailwind CSS v4
  • UI Components: shadcn/ui (New York style)
  • Icons: Lucide React

πŸ’» Building From Source

Prerequisites

  • Node.js 20 or higher
  • npm, yarn, pnpm, or bun

Setup and Run

  1. Clone the repository

    git clone https://github.com/ascendara/webview.git
    cd webview
  2. Install dependencies

    npm install
  3. Run the development server

    npm run dev
  4. Open http://localhost:3000 in your browser

Building for Production

To build a production-ready application:

npm run build
npm start

πŸ“ Project Structure

Webview/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ [code]/
β”‚   β”‚   └── page.tsx           # Dynamic code route handler
β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   └── page.tsx           # Dashboard with download monitoring
β”‚   β”œβ”€β”€ error.tsx              # Error boundary
β”‚   β”œβ”€β”€ favicon.ico            # App icon
β”‚   β”œβ”€β”€ globals.css            # Global styles and theme variables
β”‚   β”œβ”€β”€ layout.tsx             # Root layout with providers
β”‚   β”œβ”€β”€ loading.tsx            # Loading state
β”‚   β”œβ”€β”€ manifest.ts            # PWA manifest configuration
β”‚   β”œβ”€β”€ not-found.tsx          # 404 page
β”‚   └── page.tsx               # Connection page (home)
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                    # shadcn/ui components
β”‚   β”‚   β”œβ”€β”€ alert-dialog.tsx   # Alert dialog component
β”‚   β”‚   β”œβ”€β”€ button.tsx         # Button component
β”‚   β”‚   β”œβ”€β”€ card.tsx           # Card component
β”‚   β”‚   β”œβ”€β”€ input.tsx          # Input component
β”‚   β”‚   β”œβ”€β”€ progress.tsx       # Progress bar component
β”‚   β”‚   β”œβ”€β”€ skeleton.tsx       # Skeleton loader
β”‚   β”‚   β”œβ”€β”€ toast.tsx          # Toast notification
β”‚   β”‚   └── toaster.tsx        # Toast container
β”‚   β”œβ”€β”€ bottom-navbar.tsx      # Mobile bottom navigation
β”‚   β”œβ”€β”€ code-input.tsx         # 6-digit code input component
β”‚   β”œβ”€β”€ connection-guard.tsx   # Connection state guard
β”‚   β”œβ”€β”€ download-card.tsx      # Download card with controls
β”‚   β”œβ”€β”€ download-skeleton.tsx  # Download loading skeleton
β”‚   β”œβ”€β”€ install-prompt.tsx     # PWA install prompt
β”‚   β”œβ”€β”€ theme-button.tsx       # Theme toggle button
β”‚   β”œβ”€β”€ theme-selector-modal.tsx # Theme selection modal
β”‚   └── theme-selector.tsx     # Theme picker component
β”œβ”€β”€ contexts/
β”‚   └── theme-context.tsx      # Theme context provider
β”œβ”€β”€ hooks/
β”‚   └── use-toast.ts           # Toast notification hook
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ api.ts                 # API client and types
β”‚   β”œβ”€β”€ config.ts              # App configuration
β”‚   β”œβ”€β”€ crypto.ts              # End-to-end encryption utilities
β”‚   β”œβ”€β”€ format.ts              # Formatting utilities
β”‚   β”œβ”€β”€ themes.ts              # Theme definitions
β”‚   β”œβ”€β”€ utils.ts               # Utility functions
β”‚   └── version.ts             # App version
β”œβ”€β”€ types/
β”‚   β”œβ”€β”€ cache-life.d.ts        # Cache lifetime type definitions
β”‚   └── routes.d.ts            # Route type definitions
β”œβ”€β”€ .env.example               # Environment variables template
β”œβ”€β”€ components.json            # shadcn/ui configuration
β”œβ”€β”€ next.config.ts             # Next.js configuration
β”œβ”€β”€ package.json               # Dependencies and scripts
└── tsconfig.json              # TypeScript configuration

πŸš€ Usage

Connecting to Ascendara

  1. Open Ascendara desktop app
  2. Navigate to Settings β†’ Remote Access
  3. Generate a 6-digit connection code
  4. Enter the code in the web app
  5. Start monitoring your downloads

πŸ§ͺ Development Mode (Mock Dashboard)

For UI development and testing without requiring a real backend connection, the app includes a dev mock mode:

Activating Dev Mode

  1. Start the development server:

    npm run dev
  2. Navigate to http://localhost:3000

  3. Enter the connection code: 123456

  4. You'll be redirected to a mock dashboard with simulated data

Dev Mode Features

  • No Real API Calls: All backend calls are blocked in mock mode to prevent accidental production requests
  • Fake Download Data: Randomly generated game downloads with realistic names and sizes
  • Simulated Progress: Download progress bars update automatically every 2 seconds
  • Full UI Testing: Test pause, resume, and cancel actions without affecting real downloads
  • Visual Indicator: A purple "DEVELOPMENT" badge appears in the bottom navbar
  • Safe Disconnect: Exiting mock mode clears the dev session without affecting real data

Important Notes

  • Production Safety: Dev mode only works when NODE_ENV === 'development'
  • No Backend Required: Perfect for frontend development and UI iteration
  • Isolated Environment: Mock mode uses separate localStorage keys and never touches real sessions
  • API Protection: The API client automatically blocks all real network requests when mock mode is active

Use Cases

  • Rapid UI prototyping and iteration
  • Testing theme changes and animations
  • Developing new download card layouts
  • Testing loading states and empty states
  • Component development without backend dependencies

Download Management

  • Pause: Temporarily stop a download
  • Resume: Continue a paused download
  • Cancel: Stop and remove a download
  • Auto-refresh: Downloads update every 30 seconds automatically (configurable)

πŸ”Œ API Integration

The application requires a backend API server to function. You'll need to set up your own monitor endpoint that implements the following API:

  • POST /verify-code - Verify connection code
  • GET /downloads - Fetch active downloads
  • POST /downloads/:id/pause - Pause a download
  • POST /downloads/:id/resume - Resume a download
  • POST /downloads/:id/cancel - Cancel a download
  • GET /check-connection - Check connection status

Configure your API endpoint in the application settings or environment variables.

πŸ“ License & Contact

This project is part of the Ascendara ecosystem

Licensed under MIT - 2026 tagoWorks

Get in Touch


Built with πŸ’– by tago

About

The website application for viewing and managing Ascendara Downloads

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors