This repository has no description
48%
HTML 29%
C 20%
Nix 2%
CMake <1%
Shell <1%

README.md

esp32-win98-server #

An ESP-IDF web server that leverages Nix for a reproducible development environment, styled with a Windows 98 aesthetic.

Features #

  • Sysinfo: Sysinfo page for a quick look at the ESP hardware's statistics.
  • Guestbook: Stores guestbook entries on littlefs.
  • Reproducible Environment: Powered by Nix Flakes, ensuring everyone on the team has the exact same development setup.
  • ESP-IDF Integration: Uses the esp-idf framework for ESP32 development.
  • Web Server: Includes a basic web server to serve static files.
  • Custom Build Script: A simple espbuild command to prepare assets and build the project.
  • Code Formatting: Integrated with treefmt-nix for consistent code style.

Prerequisites #

Getting Started #

  1. Enter the Development Shell:

    nix develop
    

    This command will download all the necessary dependencies and drop you into a shell with the development environment ready.

  2. Build the Project:

    Once inside the shell, before running the custom build command run:

    cp sdkconfig.default sdkconfig
    idf.py menuconfig
    

    Set Wifi SSID and Wifi Password from the Web server config menu. then:

    espbuild
    

    This will:

    • Copy and optimize web assets from main/pages and main/assets into main/dist.
    • Run idf.py build to compile the project.

Usage #

After building the project, you can flash it to your ESP32 board.

  1. Flash the Firmware:

    Connect your ESP32 board and run:

    idf.py -p /dev/ttyUSB0 flash
    

    (Replace /dev/ttyUSB0 with your board's serial port).

  2. Monitor the Output:

    To see the logs from the device:

    idf.py monitor
    

Code Formatting #

This project uses treefmt-nix to format the codebase. To format all files, run:

nix fmt

Preview: #

image image image