dhtmlxScheduler with FastAPI
The current tutorial is intended for creating Scheduler with a Python/FastAPI backend and a React frontend. If you use some other technology, check the list of available integration variants below:
- dhtmlxScheduler with Node.js
- dhtmlxScheduler with ASP.NET Core
- dhtmlxScheduler with ASP.NET MVC
- dhtmlxScheduler with PHP
- dhtmlxScheduler with PHP:Slim
- dhtmlxScheduler with PHP:Laravel
- dhtmlxScheduler with SalesForce LWC
- dhtmlxScheduler with Ruby on Rails
- dhtmlxScheduler with dhtmlxConnector
The implementation is built around a REST API exposed by FastAPI, with SQLAlchemy as the ORM and SQLite as the data store. The frontend is a Vite + React + TypeScript app that uses the DHTMLX React Scheduler wrapper.
примечание
The complete source code is available on GitHub.
Requirements
- Python 3.10 or newer
- Node.js 18 or newer
- npm or yarn
The tutorial assumes the project is split into two folders:
project/
├── backend/ # FastAPI app
└── frontend/ # Vite + React app
Step 1. Initializing the backend
Create a backend folder, set up a virtual environment, and install the Python dependencies:
$ mkdir backend
$ cd backend
$ python -m venv venv
# macOS / Linux:
$ source venv/bin/activate
# Windows (PowerShell):
$ venv\Scripts\Activate.ps1
$ pip install fastapi "uvicorn[standard]" "sqlalchemy>=2" "pydantic>=2"
For a reproducible install, drop those dependencies into a backend/requirements.txt:
fastapi>=0.110,<1.0
uvicorn[standard]>=0.27,<1.0
sqlalchemy>=2.0,<3.0
pydantic>=2.5,<3.0
Then create the application package:
$ mkdir app
$ touch app/__init__.py app/main.py app/models.py app/schemas.py app/database.py