⚡ A supercharged Electron/Vite + Python/FastAPI application template ⚡

License PRs Welcome

🚀 Overview

Ampere is a modern desktop application template that combines Electron and Vite for frontend with Python and FastAPI for backend. This is a clean, versatile development environment, great for building high-performance, functional and cross platform desktop applications with a robust API layer.

✨ Features

Electron + Vite

Lightning-fast frontend development with hot module replacement

Python + FastAPI

High-performance, easy-to-use backend API framework

Cross-Platform

Works on Windows, macOS, and Linux

Development Tools

Built-in debugging, linting, and testing setup

TypeScript Support

Full TypeScript support for type-safe development

Easy Setup

Contains tasks for VSCode to setup with npm and uv

🔧 Tech Stack

Frontend

  • Electron
  • Vite
  • TypeScript/JavaScript
  • React (optional)

Backend

  • Python 3.11+
  • FastAPI
  • Uvicorn

🏁 Getting Started

Prerequisites

Quick Start with CLI

# Install ampere-cli globally
npm install -g ampere-cli

# Create a new project
ampere create my-awesome-app

# Navigate to project
cd my-awesome-app

# Start development
npm run dev

Manual Installation

# Clone the repository
git clone https://github.com/SeamusMullan/ampere.git
cd ampere

# Setup frontend
cd frontend
npm install

# Setup backend
cd backend
uv sync
uv pip install -r requirements.txt

# Start the development environment

# run frontend
npm run dev

# run backend
uv run main.py

💻 Project Structure

<project_name>
├── backend
│   ├── __pycache__
│   ├── api
│   ├── core
│   └── services
└── frontend
    ├── dist-electron
    ├── electron
    ├── node_modules
    ├── public
    └── src

🔄 How It Works

Ampere uses Electron as the application shell and embeds a Python FastAPI server that runs as a subprocess. The frontend communicates with the backend via HTTP requests, allowing for a clean separation of concerns while maintaining the performance benefits of local processing.

Ready to Build with Ampere?

Get started today and supercharge your desktop application development!