Commit Graph

20 Commits (dbf5371122b7140f581becf79e68fd679607da8d)

Author SHA1 Message Date
absc dbf5371122 The routes were in the wrong format. Correct them. 2024-08-02 23:12:33 +02:00
absc 59f02f4edf This application will handle the mime types at the web request layer. 2024-08-02 23:05:41 +02:00
absc 94ee24c777 Add the right arguments to the bootstrap procedure. 2024-08-02 22:56:03 +02:00
absc c6328bd174 The bootstrap procedure must be done before the first start.
The bootstrap will create the various tables, the admin user,
and the initial content of the platform, with the possibility
to add replication for everything.
2024-08-02 22:53:04 +02:00
absc 60989b17cd Revert "Remove table replica functions."
This reverts commit 529f15c301.

We want to be able to move things around in the end.
2024-07-28 19:26:44 +02:00
absc 529f15c301 Remove table replica functions.
Those were there when this application didn't use fragmented
tables.

Now, all the buckets are fragmented by default and we provide
the grow/1 and shrink/1 functions to expand the tables along
with the fragment properties.
2024-07-28 17:50:04 +02:00
absc e571a69820 Use crypto:rand_seed().
It's cryptographically strong and set a better state for the
pseudo-random number generator.
2024-07-27 13:16:05 +02:00
absc ab3ca1ec64 No need to use an additional variable just to compose the salted pass. 2024-07-27 12:38:30 +02:00
absc 80af46c6be Just use the classic POST form.
JSON doesn't make any sense in this case.
2024-07-27 12:36:14 +02:00
absc 895e0a5330 Enter the user handler API.
For now it handles PUTs, to create new users. It's still a
partial implementation and there is no documentation yet.

POST, PATCH and DELETE will arrive later to handle other users
operations.
2024-07-27 01:57:34 +02:00
absc 285f4ad402 Correct the callback matching for the ProvidedCallback function. 2024-07-25 01:18:00 +02:00
absc 8f7481d785 Use the REST handler instead of the default one.
This makes the code simpler and more manageable.
2024-07-24 23:32:16 +02:00
absc 03b76bddf2 No need for the bucket to be configurable.
While there, create the bucket for the users during initialization.
2024-07-23 23:42:31 +02:00
absc 3280596836 Skeleton for the storage bootstrap.
We want to automate this, for example, when deploying in a docker
container.

A bunch of static files will be loaded into the storage, in order
to be served to the clients.
2024-07-23 23:15:36 +02:00
absc 65d6e5fa05 File committed as error. 2024-07-23 22:59:39 +02:00
absc 1f243b16d3 Import the initial dudeswave code.
At this point it handles only GETs, giving back plain text
responses in case of errors.

The intention is to also produce some static pages for those,
where the CSS we will chose applies.

Other APIs will be managed through their respective handlers,
whose routes will be setup before this one.
2024-07-23 22:52:57 +02:00
absc 14e6c3cc94 Import the storage application.
This is a small abstraction layer on top of mnesia. It simplifies
table management and addition of replicas and nodes.

Some things to add in the near future:

	* Removing nodes from a mnesia cluster is not supported.
	* Observability and event handling is missing.

While it's possible to perform the aformentioned functions with
the mnesia own APIs, adding some simplifications for day to day
management may be a good idea.

However, the library is already used in another project and it's
good enough for an initial use. It will be extended if and when
required.
2024-07-23 22:09:08 +02:00
absc 4aa09346d7 Import ranch.
Ranch is the listener used by cowboy to handle HTTP connections.

URL: https://github.com/ninenines/ranch
2024-07-23 22:07:38 +02:00
absc 9fdf706bcb Import cowboy.
Cowboy is a complete and light erlang webserver, used to serve
the dudeswave blog.

URL: https://github.com/ninenines/cowboy
2024-07-23 22:06:21 +02:00
absc 8ebac63dac Import cowlib.
Cowlib is the base library used by ranch and cowboy, respectively
the listener and the webserver used in the dudeswave stack.

URL: https://github.com/ninenines/cowlib
2024-07-23 22:04:25 +02:00