A simpler alternative to Nextcloud and ownCloud, built with TypeScript and Deno using Fresh. 🦕 🍋 https://bewcloud.com/
Find a file
2024-04-19 12:19:26 +01:00
.github Fix articles list in Safari, update more dependencies, tweak deploy 2024-04-17 18:58:50 +01:00
.vscode Make it public! 2024-03-16 08:40:24 +00:00
components Add WebDav server, fully functional! 2024-04-06 19:43:34 +01:00
crons Fix news cron locks and fetching to work more than once per day. 2024-04-19 12:19:26 +01:00
db-migrations Files UI complete with search, sharing via symlink. 2024-04-04 17:55:47 +01:00
islands Add WebDav server, fully functional! 2024-04-06 19:43:34 +01:00
lib Fix news cron locks and fetching to work more than once per day. 2024-04-19 12:19:26 +01:00
routes Update dependencies, add more logging to crons 2024-04-17 14:01:06 +01:00
static Fix articles list in Safari, update more dependencies, tweak deploy 2024-04-17 18:58:50 +01:00
.dvmrc Update dependencies, add more logging to crons 2024-04-17 14:01:06 +01:00
.env.sample Build + offer docker image and docker-compose.yml file for easier self-hosting 2024-04-09 13:22:05 +01:00
.gitignore Files CRUD. 2024-04-03 14:02:04 +01:00
deno.json Allow searching events 2024-03-23 16:11:36 +00:00
dev.ts Make it public! 2024-03-16 08:40:24 +00:00
docker-compose.dev.yml Build + offer docker image and docker-compose.yml file for easier self-hosting 2024-04-09 13:22:05 +01:00
docker-compose.yml Require .env file for docker compose example 2024-04-09 20:03:21 +01:00
Dockerfile Update dependencies, add more logging to crons 2024-04-17 14:01:06 +01:00
fresh.config.ts Make it public! 2024-03-16 08:40:24 +00:00
fresh.gen.ts Add new API endpoint to get a list of files for a given directory. 2024-04-12 06:59:51 +01:00
import_map.json Fix articles list in Safari, update more dependencies, tweak deploy 2024-04-17 18:58:50 +01:00
LICENSE Make it public! 2024-03-16 08:40:24 +00:00
main.ts Make it public! 2024-03-16 08:40:24 +00:00
main_test.ts Show transparency in calendar view 2024-03-29 20:37:47 +00:00
Makefile Make it public! 2024-03-16 08:40:24 +00:00
migrate-db.ts Make it public! 2024-03-16 08:40:24 +00:00
README.md Update TODOs in README 2024-04-14 18:55:51 +01:00
tailwind.config.ts Make it public! 2024-03-16 08:40:24 +00:00

bewCloud

This is the bewCloud app built using Fresh and deployed using docker compose.

Caution

This is actively being built and should be considered pre-alpha. Bugs will exist. Code and models can change without a good upgrade path (though I'll try to avoid that). Don't use it as your only source of data!

Self-host it!

Download/copy docker-compose.yml and .env.sample as .env.

$ docker compose up # makes the app available at http://localhost:8000
$ docker compose run website bash -c "cd /app && make migrate-db" # initializes/updates the database (only needs to be executed the first time and on any updates)

Alternatively, check the Development section below.

Important

Even with signups disabled (CONFIG_ALLOW_SIGNUPS="false"), the first signup will work and become an admin.

Requirements

This was tested with Deno's version stated in the .dvmrc file, though other versions may work.

For the postgres dependency (used when running locally or in CI), you should have Docker and docker compose installed.

Don't forget to set up your .env file based on .env.sample.

Development

$ docker compose -f docker-compose.dev.yml up # (optional) runs docker with postgres, locally
$ make migrate-db # runs any missing database migrations
$ make start # runs the app
$ make format # formats the code
$ make test # runs tests

Other less-used commands

$ make exec-db # runs psql inside the postgres container, useful for running direct development queries like `DROP DATABASE "bewcloud"; CREATE DATABASE "bewcloud";`
$ make build # generates all static files for production deploy

Structure

  • Routes defined at routes/.
  • Static files are defined at static/.
  • Static frontend components are defined at components/.
  • Interactive frontend components are defined at islands/.
  • Cron jobs are defined at crons/.
  • Reusable bits of code are defined at lib/.
  • Database migrations are defined at db-migrations/.

Deployment

Just push to the main branch.

Tentative Roadmap for a v1 beta:

Where's Contacts/Calendar (CardDav/CalDav)?! Wasn't this supposed to be a core Nextcloud replacement?

Check this tag/release for more info and the code where/when that was being done. Contacts/CardDav worked and Calendar/CalDav mostly worked as well at that point.

My focus is still to get me to replace Nextcloud for me and my family ASAP, but turns out it's not easy to do it all in a single, installable thing, so I'm focusing on the Files UI, sync, and sharing, since Radicale solved my other issues better than my own solution (and it's already very efficient).

How does file sharing work?

Check this PR for advanced sharing with internal and external users, with read and write access that was being done and almost working. I ditched all that complexity for simply using symlinks, as it served my use case (I have multiple data backups and trust the people I provide accounts to, with the symlinks).

You can simply ln -s /<absolute-path-to-data-files>/<owner-user-id>/<directory-to-share> /<absolute-path-to-data-files>/<user-id-to-share-with>/ to create a shared directory between two users, and the same directory can have different names, now.

Note

If you're running the app with docker, the symlink needs to point to the container's directory, usually starting with /app if you didn't change the Dockerfile, otherwise the container will fail to load the linked directory.