Commit Graph

55 Commits

Author SHA1 Message Date
Bruno Bernardino
47f443c300 Fix for Evolution CardDav/CalDav
They seem to make `GET` requests with `body`, which isn't allowed by the spec and causes Deno to fail. This prevents/ignores that.

It also makes the default `docker-compose.yml` "safer" by not exposing the database and container.

Finally, it removes a couple of unmaintained "one-click-deploy" buttons and simplifies documentation.
2025-08-28 14:57:51 +01:00
Bruno Bernardino
289f34fe8e Basic CardDav UI (Contacts)
This implements a basic CardDav UI, titled "Contacts". It allows creating new contacts with a first name + last name, and editing their first and last names, main email, main phone, and notes.

You can also import and export VCF (VCARD) files.

It also allows editing the VCARD directly, for power users.

Additionally, you can choose, create, or delete address books, and if there's no address book created yet in your CardDav server (first-time setup), it'll automatically create one, titled "Contacts".

Finally, there are some dependency updates and a fix for the config not allowing disabling the `cardDav` or the `calDav` server.

Related to #56
2025-08-10 07:48:16 +01:00
Bruno Bernardino
781df673dc Add CardDav and CalDav servers (#80)
* Add CardDav and CalDav servers

This implements the servers, but not the clients (yet). The implementation is essentially a proxy to Radicale (as a container in `docker-compose.yml`), with certain security assurances.

If you're upgrading, basically you'll need to create a new `data-radicale` directory, and everything else should just work.

This will also release v2.3.0 with those enabled by default. Tested with Thunderbird and Apple Calendar + Contacts.

To disable these, simply add the new config details and comment out or don't add the new `radicale` service from `docker-compose.yml`.

Related to #56
2025-07-20 10:35:32 +01:00
Bruno Bernardino
cb95085ea3 Fix Windows clients sending the wrong path for public sharing
Fixes #73
2025-06-22 11:19:02 +01:00
Bruno Bernardino
7fac7febcf Public File Sharing (#72)
* Public File Sharing

This implements public file sharing (read-only) with and without passwords (#57).

It also fixes a problem with filenames including special characters like `#` not working properly (#71).

You can share a directory or a single file, by using the new share icon on the right of the directories/files, and click on it to manage an existing file share (setting a new password, or deleting the file share).

There is some other minor cleanup and other copy updates in the README.

Closes #57
Fixes #71

* Hide UI elements when sharing isn't allowed
2025-06-20 12:04:16 +01:00
Bruno Bernardino
c7d6b8077b Enable Email as a MFA method/option (#68)
This adds Email as a multi-factor authentication method/option. It reuses the `VerificationCode` for the code generation and validation.

It also refactors the email templating for easier repurposing.

Finally, it has a small Deno version bump.

Closes #25
2025-06-11 15:53:39 +01:00
Bruno Bernardino
111321e9c6 Migrate email provider (from Brevo to generic SMTP) (#67)
This means we now need to have the text and HTML content set in the code, which is arguably better.

In order to avoid allowing legacy Brevo API Key support, this will also introduce breaking changes and will be released as v2.0.0.

I took the opportunity to remove a few deprecated things (like legacy ENV-based config), upgrade PostgreSQL, and pin a specific version in `docker-compose.yml`, since I don't plan to do breaking releases anytime soon, and upgrading PostgreSQL should be fine from now on if the version is pinned.

If you were using Brevo with an API Key, they support SMTP as well, just update your config.

If you were using ENV-based config, check `bewcloud.config.sample.ts`to create your `bewcloud.config.ts`.

If you need help upgrading you PostgreSQL container, I've written a simple guide [step-by-step guide](https://news.onbrn.com/step-by-step-guide-upgrading-postgresql-docker-containers/).
2025-06-10 10:28:13 +01:00
Bruno Bernardino
3038461fb7 Fix WebDAV discovery
Also fix stricter SSO providers which require the paths to match in `redirect_uri`.

Probably fixes #66
2025-06-06 11:30:04 +01:00
Bruno Bernardino
aa18dcdb4e Implement (optional) SSO via OIDC (OpenID Connect) (#64)
This implements optional SSO via OIDC for logging in and signing up (for the first admin sign up or if sign up is allowed). The most requested feature!

Tested with Authentik and Google!

It includes a new `SimpleCache` interface (in-memory, using [`caches`](https://developer.mozilla.org/en-US/docs/Web/API/Window/caches)) for storing the state and code challenges.

Closes #13
2025-06-05 18:10:40 +01:00
0xGingi
455a7201e9 Add Optional 2FA Support (#61)
* Add TOTP MFA Support

* Add Passkey MFA Support

It's not impossible I missed some minor cleanup, but most things make sense and there isn't a lot of obvious duplication anymore.

---------

Co-authored-by: Bruno Bernardino <me@brunobernardino.com>
2025-05-29 17:30:28 +01:00
Bruno Bernardino
e337859a22 Implement a more robust Config (#60)
* Implement a more robust Config

This moves the configuration variables from the `.env` file to a new `bewcloud.config.ts` file. Note that DB connection and secrets are still in the `.env` file.

This will allow for more reliable and easier personalized configurations, and was a requirement to start working on adding SSO (#13).

For now, `.env`-based config will still be allowed and respected (overriden by `bewcloud.config.ts`), but in the future I'll probably remove it (some major upgrade).

* Update deploy script to also copy the new config file
2025-05-25 15:48:53 +01:00
Bruno Bernardino
6cfb62d1a2 Refactor data handlers + misc fixes
This refactors the data handlers into a more standard/understood model-like architecture, to prepare for a new, more robust config system.

It also fixes a problem with creating new Notes and uploading new Photos via the web interface (related to #58).

Finally, it speeds up docker builds by sending in less files, which aren't necessary or will be built anyway.

This is all in preparation to allow building #13 more robustly.
2025-05-24 08:24:10 +01:00
Bruno Bernardino
b8866cdb39 Upload Directories via Web
This implements the option to choose directories when uploading files via the Web UI (The most important part of #52).

When you choose a directory, its file and sub-directory structure will be maintained.

Tested with the latest Safari, Firefox, and Chrome.

Additionally, the Deno version was updated, which required some accessibility improvements as well.
2025-05-13 16:07:27 +01:00
Prefex
5467fb3533 Custom Title, Description and Help Email (#54)
* Add configuration of Help email, Title, Description

* Format configuration changes

* Use fragments for help sections

* Revert cleanup in misc.ts
2025-03-20 15:18:09 +00:00
Bruno Bernardino
07bbfbb0a5 Change favicon to dark. 2025-02-27 15:09:21 +00:00
Bruno Bernardino
4faa7bd05d Security fix for path-traversal attack (#48)
Additionally:

- Make expense and budget modal "reset" once closed, saved, or deleted.
- Make manifest icons dark
- Budgets in small screens should be full-screen
- Minor code cleanup

Fixes #48
2025-02-27 15:02:10 +00:00
Bruno Bernardino
b3bd8cb3cc Add manifest to allow "installing" app in mobile devices 2025-02-26 18:40:12 +00:00
Bruno Bernardino
874ab006f9 Add Expenses app
A UI based on [Budget Zen](https://github.com/BrunoBernardino/budgetzen-web) but slightly updated and adjusted for bewCloud. It also features a chart with available money and spent by budgets.

This is useful for envelope-based budgeting.
2025-02-26 17:43:53 +00:00
Bruno Bernardino
e08188b58b Minor UX and code improvements 2024-12-06 06:08:15 +00:00
Bruno Bernardino
bbf8683004 Update Deno to 2.1 LTS! 2024-11-30 08:13:22 +00:00
Bruno Bernardino
769ae5b9f1 Update dependencies, change thumbnail generation method 2024-08-13 16:46:12 +01:00
Bruno Bernardino
d0c23a9746 Implement photo thumbnails
This implements generating image thumbnails on the fly via ImageMagick WASM, and tells the browser to cache them for a week, making the loading of photo directories much faster when it has many large images.

Closes #12
2024-07-05 07:05:11 +01:00
Bruno Bernardino
e21207a76a Add proper locking/unlocking to WebDAV.
Tweak README, add one-click deploy for Digital Ocean and Render.
2024-05-05 08:09:34 +01:00
Bruno Bernardino
6ee0a56f0c Respect CONFIG_ENABLED_APPS in .env 2024-05-01 09:21:30 +01:00
Bruno Bernardino
635ca90de0 Add Photos UI 2024-04-27 08:12:44 +01:00
Bruno Bernardino
3f5422f8eb Add basic Notes UI 2024-04-26 14:31:25 +01:00
Bruno Bernardino
7fd29ba7bf Update dependencies, add more logging to crons 2024-04-17 14:01:06 +01:00
Bruno Bernardino
670845ed13 Add new API endpoint to get a list of files for a given directory. 2024-04-12 06:59:51 +01:00
Bruno Bernardino
735b14544a Build + offer docker image and docker-compose.yml file for easier self-hosting
Tweak login and auth for IP-based setups and setups without email enabled.
2024-04-09 13:22:05 +01:00
Bruno Bernardino
5a85dd224e Allow signing up forever without Brevo.
Also allow logins from local IPs (related to #5).
2024-04-08 20:53:28 +01:00
Bruno Bernardino
5229e196b4 Improve WebDav support to include file size and modified time 2024-04-08 16:01:59 +01:00
Bruno Bernardino
c1443191ce Better CORS response 2024-04-07 08:25:07 +01:00
Bruno Bernardino
265c52a7e5 Add WebDav server, fully functional!
Some more code cleanup.
2024-04-06 19:43:34 +01:00
Bruno Bernardino
aee720fbc4 Files UI complete with search, sharing via symlink. 2024-04-04 17:55:47 +01:00
Bruno Bernardino
bd4be8dbec Formatting 2024-04-04 12:54:49 +01:00
Bruno Bernardino
a8a0e20428 Advanced file sharing
This is a WIP for advanced file sharing, but I won't pursue this for now since using symlinks in the file system works for me, and this is adding a ton of complexity I don't want or need right now.
2024-04-04 12:52:44 +01:00
Bruno Bernardino
4e5fdd569a Files CRUD.
Remove Contacts and Calendar + CardDav and CalDav.
2024-04-03 14:02:04 +01:00
Bruno Bernardino
c4788761d2 Support CalDav 2024-03-31 21:21:30 +01:00
Bruno Bernardino
321341a2fb Support automatically creating recurring events
Also implement locks for tasks that can have unintended side-effects if ran simultaneously.

Other minor UI tweaks.
2024-03-31 13:19:13 +01:00
Bruno Bernardino
1a6cb96965 View, Import, and Export reminders! 2024-03-30 12:54:49 +00:00
Bruno Bernardino
abd1fdee62 Support editing and exporting transparency 2024-03-30 07:05:28 +00:00
Bruno Bernardino
6b3dc4f256 Show transparency in calendar view
Also separate utils.ts file which was getting too big, and add a POST test
2024-03-29 20:37:47 +00:00
Bruno Bernardino
0b4b741d79 Import Calendar Events 2024-03-29 15:51:45 +00:00
Bruno Bernardino
a788456751 Support exporting calendar events
Also update Deno and libraries
2024-03-25 15:50:15 +00:00
Bruno Bernardino
5b3217cdfc Allow searching events
Also upgrade Fresh
2024-03-23 16:11:36 +00:00
Bruno Bernardino
9cd5d9f43d Allow updating events 2024-03-21 16:24:59 +00:00
Bruno Bernardino
f779dde0fc Calendar code re-organization, event CRUD (except for Update). 2024-03-20 20:21:20 +00:00
Bruno Bernardino
eff6a08771 Calendar SQL and CRUD 2024-03-19 16:05:47 +00:00
Bruno Bernardino
062c0d3d09 Add CalDav routes and methods, with mock data 2024-03-18 19:18:29 +00:00
Bruno Bernardino
5bbcd72458 Week view UI + Calendar UI tweaks 2024-03-18 08:55:21 +00:00