RepositoryPascal
risoflora

risoflora/brookfreepascal

The perfect Free Pascal framework for your web applications.

174stars
34forks
8issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: brookframework

#1 Repository of the month

1
TINIX TRENDING·Topic: pascal

#1 Repository of the month

1
TINIX TRENDING·Topic: lazarus

#1 Repository of the month

INTRODUCTION

Brook for Free Pascal is the perfect Free Pascal framework for your web applications. It's pure Pascal. You don't need to leave your preferred programming language.

It's complete: simple actions or configurable actions for database access, advanced routing features, wizard for Lazarus, support for internationalization, high compatibility with JSON structures, easy and elegant REST implementation, plugins for varied needs, extensible and decoupled brokers... In fact, you have several reasons to adopt Brook as your web development framework.

FEATURES

  • Advanced routes management – Actions are performed by means of routes. Brook knows how to receive a request and choose the correct URL and the correct method to reply to it.
  • Integrated data persistance – Brook offers a table object where data can be handled. Less instantiations, less coding, with an elegant syntax.
  • JSON native support – JSON is widespred in the web for data exchange purposes. You will really appreciate Brooks' good JSON support.
  • REST architecture support – REST is an architecture able to simplify and standardize data requests and replies. Brook is powerful even if you don't use REST – but you will want to use it.
  • Lazarus wizards for installation and usage - With Lazarus, development is easier; with the Brook wizards, only a few clicks are required to start and configure your Brook projects.

GET STARTED

If you use Free Pascal only

Create three files:

  • cgi1.lpr;
  • unit1.pas;
  • brokers.pas;

In cgi1.lpr, type:

program cgi1;
 
{$mode objfpc}{$H+}
 
uses
  BrookApplication, Brokers, Unit1;
 
begin
  BrookApp.Run;
end.

In unit1.pas, type:

unit Unit1;
 
{$mode objfpc}{$H+}
 
interface
 
uses
  BrookAction;
 
type
  TMyAction = class(TBrookAction)
  public
    procedure Get; override;
  end;
 
implementation
 
procedure TMyAction.Get;
begin
  Write('Hello world!');
end;
 
initialization
  TMyAction.Register('*');
 
end.

In brokers.pas, type:

unit Brokers;

{$mode objfpc}{$H+}

interface

uses
  BrookFCLCGIBroker;

implementation

end. 

Compile the project cgi1.lpr and copy the resulting file to CGI directory of your web server. Now, in your web browser, access the following URL:

http://localhost/cgi-bin/cgi1


If you are a Lazarus user

Open and install the file brookex.lpk. After the installation, select File | New ... and, in Brook for Free Pascal, choose the Simple CGI application option as shown in the figure below:

Brook - New project

Save and compile the project. Copy the resulting file to the CGI directory of your web server and enjoy! See the final result:

Brook - Hello world

PLUGINS

Almost all of these plugins can be used separatly, not necessarily bundled with Brook.

  • dOPF – Sleek, intuitive and fast object persistence for faster and easier database development.
  • RUtils – Some general purpose routines for string conversion, parsing, encoding and more.
  • JTemplate – Fill variables in a template file.
  • QTemplate – Alternative to the FPTemplate engine.
  • EasyRSS – Easiest way for Pascal developers to provide news updating services in their applications.
  • XMailer – Simple way to send e-mail using Free Pascal.
  • AlgEx – Process algebraic expressions passed as strings.
  • Captcha – Verification images to block bot access on login pages.
  • MGeoIP – Identify the name of the country or city where IPs reside.
  • ConvUtils – Conversion between units of measurement (centimeters, inches, liters etc.).
  • HtmlDoc – Write headers, body and other relevant tags using Object Pascal.
  • LJGridUtils – Easy conversion from LCL to JSON and vice versa.
  • Brook-Telegram – Consume the Telegram Bots API in a Brook application.

LICENSE

The source code of the Brook for Free Pascal is distributed under the GNU Lesser General Public License. See the project licence for copyright/license details.

SYSTEM REQUIREMENTS

The stable version of Free Pascal & Lazarus.

DOCUMENTATION

The project documentation is available in two formats: HTML and PDF.

VERSIONING

For transparency and insight into our release cycle, and for striving to maintain backward compatibility, Brook for Free Pascal will be maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

<major>.<minor>.<release>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and release);
  • New additions without breaking backward compatibility bumps the minor (and resets the release);
  • Bug fixes and misc changes bumps the release;

For more information on SemVer, please visit http://semver.org.

SUPPORT, BUGS, CONTACT

Please use the issues page. Your cooperation will be appreciated.

CONTRIBUTORS

Brook would not be possible without important and active contributors. See their names here.

See the name of all donors here.

DOWNLOAD

You can download the last release here. Alternatively, you can also follow the project's GIT repository. The address is:

https://github.com/risoflora/brookfreepascal.git

THIRD PARTY

The Brook supports third party solutions and, for these, there is a broker file implementing your features. You can download the package containing all files here.

ALTERNATIVES

  • Brook framework - Microframework which helps to develop web Pascal applications.
  • mORMot - Synopse mORMot ORM/SOA/MVC framework.
  • Free Spider - Web development package for Free Pascal/Lazarus.
  • FCL-Web - Built-in Free Pascal web library.

Welcome to Brook! Welcome to Brook!

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026
RepositoryPascal
winddriver/Delphi-Cross-Socket

Delphi cross platform socket library

477
Nov 2, 2026
RepositoryPascal
joaopauloschuler/neural-api

CAI NEURAL API - Pascal based deep learning neural network API optimized for AVX, AVX2 and AVX512 instruction sets plus OpenCL capable devices including AMD, Intel and NVIDIA.

468
Nov 29, 2026
RepositoryPascal
GuvaCode/ray4laz

A complete header translation (binding) of the raylib 6.2 to Pascal. Without any funky helper functions for memory alignment issues. Inspired and partially based on the drezgames/raylib-pascal binding, however a little cleaner and more recent, with FPC 3.2.0 and up support.

183
Oct 15, 2026
RepositoryPascal
castle-engine/castle-engine

Cross-platform (desktop, mobile, console, web) 3D and 2D game engine. Powerful visual editor. Support for glTF, X3D, IFC and more. Fast clean code using modern Pascal. Free and open-source.

1.3k
Nov 26, 2026
RepositoryPascal
synopse/mORMot2

The Ultimate OpenSource RTL / ToolBox for Delphi and FreePascal

738
Nov 26, 2026
RepositoryPascal
GerryFerdinandus/bittorrent-tracker-editor

Software for add or remove tracker from torrent files.

577
Dec 1, 2026
RepositoryPascal
salvadordf/WebView4Delphi

WebView4Delphi is an open source project created by Salvador Díaz Fau to embed Edge/Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows.

420
Nov 23, 2026
RepositoryPascal
zamtmn/zcad

Simple CAD program

342
Nov 26, 2026