Coder Social home page Coder Social logo

brunobernardino / loggit-web Goto Github PK

View Code? Open in Web Editor NEW
38.0 3.0 2.0 1.09 MB

Simple, Encrypted Life Tracking & Logging. ๐Ÿ’Š

Home Page: https://app.loggit.net

License: GNU Affero General Public License v3.0

JavaScript 1.55% Makefile 0.37% TypeScript 87.20% CSS 6.22% Dockerfile 0.19% PLpgSQL 2.91% SCSS 1.55%
events typescript e2ee end-to-end-encryption deno deno-deploy pwa vanilla-javascript web-crypto

loggit-web's Introduction

Loggit - Web App

This is the web app for the Loggit app, built with Deno and deployed using docker-compose.

This is v3, which is end-to-end encrypted with open Web Standards, and works via web on any device (it's a PWA - Progressive Web App).

It's not compatible with Loggit v2 (end-to-end encrypted via Userbase) which you can still get locally from this commit, nor v1 (not end-to-end encrypted), which you can still get locally from this commit. You can still export and import the data as the JSON format is the same across all 3 versions (unencrypted).

NOTE: If your Android launcher doesn't show PWAs as an app, I've got a solution for you: a simple webview app.

Self-host it!

Deploy to DigitalOcean

Deploy to Render

Or check the Development section below.

NOTE: You don't need to have emails (Brevo) and subscriptions (Stripe) setup to have the app work. Those are only used for allowing others to automatically manage their account. You can simply make any user.status = 'active' and user.subscription.expires_at = new Date('2100-01-01') to "never" expire, in the database, directly.

Framework-less

This right here is vanilla TypeScript and JavaScript using Web Standards. It's very easy to update and maintain.

It's meant to have no unnecessary dependencies, packagers, or bundlers. Just vanilla, simple stuff.

Requirements

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

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

If you want to run the app locally with SSL (Web Crypto standards require https except for Chrome), you can use Caddy (there's a Caddyfile that proxies https://localhost to the Deno app).

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

Development

$ docker-compose up # (optional) runs docker with postgres, locally
$ sudo caddy run # (optional) runs an https proxy for the deno app
$ 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 "loggit"; CREATE DATABASE "loggit";`

Structure

  • Backend routes are defined at routes.ts.
  • Publicly-available files are defined at public/.
  • Pages are defined at pages/.
  • 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.

TODOs:

  • Enable true offline mode (securely cache data, allow read-only)

loggit-web's People

Contributors

brunobernardino avatar jpylypiw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

loggit-web's Issues

[feature request] show how many time the event occurred in the selected month

Hi,

I just signed up and so far it looks very promising but for it to be perfect for my use case, I'd like to propose one feature.
default

Instead of just saying 4x / year, I'd like It to say 4x / year, 4x / the_selected month. So in this case it would read 4x/year, 4x/October 2023. So this way I can set and track my goals on a monthly basis if that makes sense.

Thank you for the app,
Remi

Docker Image Hosting / Docker Registry

Hello!
Thanks a lot for the development of this great project. I would like to install the software in my HomeLab under Kubernetes. Unfortunately I have not found where the Docker image is hosted. Is there a Docker registry that hosts the image?
For example, you could have a package pushed to the GitHub Docker Registry with every release. The Dockerfile already exists. The only thing missing is the automatic build and push of the image.

can't sign up user local instance

Whenever I try to sign up a user on a local instance, I'm receiving "invalid email/password". Is there a setting that is disallowing this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.