Skip to content

About

Open-Source Angular Appointment Calendar Component (TypeScript + PHP/MySQL)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Open-Source Angular Appointment Calendar Component (TypeScript + PHP/MySQL)

This is the code repository for the Open-Source Angular Appointment Calendar Component (TypeScript + PHP/MySQL) tutorial by DayPilot.

Description

  • Includes DayPilot Lite for JavaScript - open-source calendar/scheduling components for JavaScript/Angular/React/Vue (Apache License 2.0).
  • This project was generated using the DayPilot UI Builder, an online tool for configuring DayPilot components and generating starter projects.

License

  • The code of this tutorial is licensed under Apache License 2.0.
  • This tutorial may include third-party libraries available under their respective licenses.

Project commands (run from frontend/)

  • Install: npm ci (uses the committed package-lock.json).
  • Development: npm run start.
  • Build: npm run build.
  • Lint: no lint script is provided.
  • Test: npm run test.

Project layout

frontend/ contains the Angular application, package files and configuration. backend/ contains the PHP JSON API. Shared licensing and third-party notices are kept at the repository root.

Run locally

Use Node.js supported by Angular 22, npm, and PHP 8 with PDO SQLite enabled. The commands below work in Windows PowerShell or Command Prompt, macOS, and Linux. Make sure php, node, and npm are on PATH. On Windows, enable pdo_sqlite in the active php.ini (locate it with php --ini). From the sample root, start the PHP server:

cd backend
php -S 127.0.0.1:8090 -t public

In a second terminal, starting at the sample root:

cd frontend
npm ci
npm start

Open http://localhost:4200. Angular serves the frontend and proxies /api/** to PHP at http://127.0.0.1:8090 using frontend/proxy.conf.json. Select a time range to create an appointment; drag to move or resize it and hover to reveal the delete icon. The Navigator selects the visible week. The database starts empty. Appointments are stored in backend/daypilot.sqlite, created automatically on the first API request, and survive reloads and server restarts. Keep this generated file out of source control and the download. Only backend/public/ is served. The database, configuration, and API implementation remain outside the document root; its entry point dispatches the allowed API routes.

Build

From the sample root:

cd frontend
npm run build

The static output is in frontend/dist/angular-appointment-calendar-component-typescript/browser/. The development proxy is not part of the production build. Configure your web server to serve that output and forward /api/ to PHP. Do not expose the SQLite file. This tutorial has no authentication; add access control before using it for private appointments.

Optional MySQL

Create a MySQL database named calendar and a user with permissions to create and modify its events table. Enable PHP's PDO MySQL extension (pdo_mysql in php.ini on Windows). Edit backend/config.php: set driver to mysql and fill in host, port, database, username, and password in its mysql array. Keep real credentials local. Restart PHP using the same command shown above; no shell environment variables are needed on any platform.

The table initializes automatically with the same fields as SQLite. Existing SQLite appointments are not copied. SQLite is the tested local setup; optional MySQL configuration requires a running MySQL service.

About

Open-Source Angular Appointment Calendar Component (TypeScript + PHP/MySQL)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages