Skip to content

A very simple (but still reactive and transactional) TODO app built with reboot.dev.

License

Notifications You must be signed in to change notification settings

reboot-dev/reboot-todo-python

Repository files navigation

Reboot TODO Starter

Frontend borrowed from: https://github.com/e-motta/my-react-app

For the impatient:

  1. Prepare an environment by either:
  2. Run the application

Overview

A very simple (but still reactive and transactional!) TODO app.

The Reboot '.proto' definition can be found in the api/ directory, grouped into subdirectories by proto package, while backend specific code can be found in backend/ and front end specific code in web/.

For more information on all of the Reboot examples, please see the docs.

Prepare an environment by...

Using VSCode connected to a GitHub Codespace

This method requires running VSCode on your machine: if that isn't your bag, see the other environment option below.

This repository includes a Dev Container config (more about Dev Containers) that declares all of the dependencies that you need to build and run the example. Dev Containers can be started locally with VSCode, but we recommend using GitHub's Codespaces to quickly launch the Dev Container:

  1. Right-click to create a Codespace in a new tab or window:
    • Open in GitHub Codespaces
    • Important: In order to view the example's front end, you must connect your local VSCode to the codespace: you cannot use VSCode in a browser window.
  2. Go to https://github.com/codespaces and click the three dots next to the codespace you just created and then click Open in Visual Studio Code.

Now you're ready to run the application!

Installing prerequisites directly

Running directly on a host requires:

  • A platform of either:
    • x86_64 Linux with glibc>=2.35 (Ubuntu Jammy and other equivalent-generation Linux distributions)
    • arm64 or x86_64 MacOS with MacOS>=13.0 and Xcode>=14.3
  • Python >=3.10
  • Node.js (for the front end)
  • Docker
    • Note: the example does not run "inside of" Docker, but Docker is used to host a native support service for local development.

If you are unable to meet any of these requirements, we suggest using the VSCode and Dev Container environment discussed above.

Now you're ready to run the application!

Run the application

Backend

Our backend is implemented in Python and we must install its dependencies before running it.

python3 -m venv ./.venv && source .venv/bin/activate && pip install -r requirements.txt

Run the backend

Then, to run the application, you can use the Reboot CLI rbt (but only within the virtual environment you set up above):

rbt dev run

Running rbt dev run will watch for file modifications and restart the application if necessary. See the .rbtrc file for flags and arguments that get expanded when running rbt dev run.

Front end

To run the front end, open a separate terminal/shell and do:

npm install
npm run dev:web

If using VSCode, the page should load automatically, or you can visit localhost:3000.

About

A very simple (but still reactive and transactional) TODO app built with reboot.dev.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published