Skip to content

StevenEddies/edc

Repository files navigation

EDC

Self-hosted web app to help you build good habits by doing things every day. Inspired by the Every Day Calendar.

Please note this project is still in development. It's functional, but very rough around the edges.

Screenshot of EDC

Usage

Server Requirements

  • Docker engine (18.06.0+), CLI and compose (1.22.0+).
  • An OS capable of supporting the above (these instructions assume your server is linux based, but should be adaptable to others).

Downloading

Download the appropriate release "edc-xx.zip" from the Releases page, and extract it into a suitable location on your server.

This download is a zip file containing a Docker Compose file, and a folder which contains the configuration and data of the backend. The actual docker images will be downloaded on first run.

Customisation

Edit var/config.yaml within the extracted edc folder (if using terminal, you can run nano var/config.yaml from that folder). It should look something like this:

---
users:
  - username: "steven"
    passwordHash: "$2a$07$S6DuSWce4CbGCVhoyTTJH.RlS36u4tBCOaUDwVKR3B3wjEKW36dUK"
  - username: "bob"
    passwordHash: "$2a$07$pT0wuasDR7F0NUmRhy3jk..RFFMYDoSiyNJKmuBAWV93Q9lj/PWKy"
goals:
  - name: "Something I want to do every day"
  - name: "Something else I want to do every day"
datastore:
  folder: "/opt/edc-backend/var/data/"
  • Note that it's YAML, so make sure you're using spaces rather than tabs.
  • User names should be lowercase alphanumeric only.
  • Password hashes should be bcrypt, see below. Passwords should be at least 8 characters.
  • The datastore location above is part of the mounted docker volume. Assuming you haven't modified docker-compose.yaml, this will correspond to var/data/ within this edc folder on the host system.

You can also edit docker-compose.yaml if you know what you're doing.

To generate bcrypt password hashes, run docker run -it steveneddies/edc-config-util:<version> and follow the interactive prompts. This generates a hash, but you will need to insert it into your config.yaml manually.

Upgrading

  • Check the release's "Upgrading" section to determine whether any additional steps are required.
  • Update docker-compose.yaml:
    • If you are using the default version of the file, simply replace that one file with the corresponding version from the release you are upgrading to.
    • Or if you have your own version of that file with custom changes, edit it to update the version tag on both docker images.
  • Stop and start the server (see below).

Running the Server

From a terminal in your edc folder:

  • To start the server: docker-compose up -d
  • To stop the server: docker-compose down

TCP port 80 needs to be internet-accessible (or really, forwarded from a reverse proxy which handles HTTPS termination).

Development

Contributing

If you'd like to suggest a feature or report a bug, please use the issue tracker.

I'm not currently looking for development collaborators, but do get in touch (see below) if you're interested.

Technology

The backend is Java using the Dropwizard framework. The frontend is Typescript, HTML and CSS using the Angular framework and the NGINX server. Builds are managed via Gradle and containerised using Docker and Docker Compose.

Links

Building

To get started:

  1. Ensure you have:
    • Java JDK (17+).
    • Docker engine (18.06.0+), CLI and compose (1.22.0+).
    • Eclipse IDE for Enterprise Java and Web Developers.
    • Angular CLI.
  2. Clone this repository into Eclipse.
  3. Import the project into an Eclipse workspace.
  4. Use the :edc-backend:run Gradle task to run the backend; and ng serve from a terminal (working directory edc-frontend) to run the frontend locally.

Publishing

  • Ensure all changes are committed and pushed to the Github repository.
  • Run ./gradlew release -PbuildVersion=0.1-dev.X, replacing X with the build number.
  • Wait for the Gradle build to run.
  • Publish the release from within the Github UI, including describing the changes.

Version Conventions

  • Release versions use the form major.minor.build and the SCM branch is named major.minor
  • Development versions use the form major.minor-dev.build and the SCM branch is named devmajor.minor

Additional upgrade steps may be needed when upgrading between release versions, if the major version changes, or rarely if the minor version changes. They may also be needed between any arbitrary development versions.

Contact

Please email steven@eddies.me.uk.

Credits

This application is developed by and copyright Steven Eddies, 2021-22. It's licensed under the Apache licence version 2.0 (see the LICENCE file alongside this one).

It was inspired by (but is not affiliated with) the Every Day Calendar by Simone Giertz:

Libraries

About

Self-hosted web app to help you build good habits by doing things every day. Inspired by the Every Day Calendar.

Resources

License

Stars

Watchers

Forks

Packages

No packages published