-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: move ARCHITECTURE.md to architecture.rst
- Loading branch information
1 parent
4428253
commit c913681
Showing
4 changed files
with
65 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Architecture | ||
############ | ||
|
||
This page describes the architecture of PostgREST. | ||
|
||
Bird's Eye View | ||
=============== | ||
|
||
.. image:: ../_static/arch.png | ||
|
||
Code Map | ||
======== | ||
|
||
This section talks briefly about various important modules. | ||
|
||
The starting points of the program are: | ||
|
||
- `Main.hs <https://github.com/PostgREST/postgrest/blob/main/main/Main.hs>`_ | ||
- `CLI.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/CLI.hs>`_ | ||
- `App.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/App.hs>`_ | ||
|
||
``App.hs`` is then in charge of composing the different modules. | ||
|
||
Auth | ||
---- | ||
|
||
`Auth.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/Auth.hs>`_ is in charge of :ref:`authn`. | ||
|
||
Api Request | ||
----------- | ||
|
||
`ApiRequest.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/ApiRequest.hs>`_ is in charge of parsing the URL query string (following PostgREST syntax), the request headers, and the request body. | ||
|
||
A request might be rejected at this level if it's invalid. For example when providing an unknown media type to PostgREST or using an unknown HTTP method. | ||
|
||
Plan | ||
---- | ||
|
||
Using the Schema Cache, `Plan.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/Plan.hs>`_ fills in out-of-band SQL details (like an ``ON CONFLICT (pk)`` clause) required to complete the user request. | ||
|
||
A request might be rejected at this level if it's invalid. For example when doing resource embedding on a nonexistent resource. | ||
|
||
Query | ||
----- | ||
|
||
`Query.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/Query.hs>`_ generates the SQL queries (parametrized and prepared) required to satisfy the user request. | ||
|
||
Only at this stage a connection from the pool might be used. | ||
|
||
Schema Cache | ||
------------ | ||
|
||
`SchemaCache.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/SchemaCache.hs>`_ is in charge of :ref:`schema_cache`. | ||
|
||
Config | ||
------ | ||
|
||
`Config.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/Config.hs>`_ is in charge of :ref:`configuration`. | ||
|
||
Admin | ||
----- | ||
|
||
`Admin.hs <https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/Admin.hs>`_ is in charge of the :ref:`admin_server`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,7 @@ OpenAPI | |
openapi | ||
ORM | ||
ov | ||
parametrized | ||
passphrase | ||
PBKDF | ||
PgBouncer | ||
|