Skip to content

Example fasthtml applications demonstrating a range of web programming techniques

License

Notifications You must be signed in to change notification settings

AnswerDotAI/fasthtml-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 28, 2025
bb24bc4 · Jan 28, 2025
Sep 14, 2024
Dec 10, 2024
Oct 20, 2024
Sep 14, 2024
Jan 28, 2025
Jul 30, 2024
Sep 15, 2024
Nov 27, 2024
Sep 14, 2024
Jun 16, 2024
Jun 16, 2024
Jul 22, 2024
Aug 5, 2024
Aug 29, 2024
Aug 8, 2024
Aug 13, 2024
Oct 20, 2024
Jul 29, 2024
Sep 8, 2024
Jun 21, 2024
Aug 24, 2024
Nov 19, 2024
Jul 28, 2024
Sep 8, 2024
Sep 8, 2024
Oct 24, 2024
Aug 16, 2024
Jun 2, 2024
Jul 22, 2024
Jun 16, 2024
Jun 19, 2024
Sep 27, 2024

Repository files navigation

FastHTML Example Apps

This repository contains a collection of example applications built using FastHTML, demonstrating various features and use cases. Here are some of the highlighted apps:

1. Game of Life

An interactive implementation of Conway's Game of Life, showcasing real-time updates and multi-client synchronization through WebSockets.

Game of Life Animation

Key features:

  • Interactive Game of Life grid
  • Real-time updates across multiple clients
  • WebSocket integration for live synchronization

View Game of Life App

2. Todo App

A simple yet functional Todo list application demonstrating dynamic updates and database integration.

Key features:

  • Add, edit, and delete todo items
  • Mark todos as complete
  • Real-time updates without page reloads
  • SQLite database integration

View Todo App

3. Chatbot

Chatbot Screenshot

A simple chatbot, showcasing custom styling with DaisyUI for the chat message bubbles. Includes different approaches to handling chat message updates.

View Chatbot App

4. Pictionary

Pictionary Screenshot

Sending user drawings to a multi-modal AI model for continuous captioning.

View Pictionary App

Additional Examples

The remaining examples are a collection of smaller demos and utilities showcasing various features of FastHTML. These are proof-of-concepts and demos rather than full-fledged applications, but should still show some useful patterns and techniques you can use in your own projects.

Running the Apps

Each app is contained in its own directory. To run an app:

  1. Navigate to the app's directory
  2. Install the required dependencies (usually with pip install -r requirements.txt)
  3. Run the app using the command specified in the app's README (typically uvicorn main:app or python main.py)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Acknowledgements

These examples were created to showcase the capabilities of FastHTML, a Python framework for building dynamic web applications.