litter again, now in Go as a PWA --- a microblogging service without notifications (by default off) and pesky messaging, just a raw mind flow
read more (a blog post)
api
- swagger documentation
cmd
- main app entrypoints for build
cmd/littr/http_server.go
- init app file for the app's backend side with REST API service
cmd/littr/wasm_client.go
- lightened version of HTTP server, includes basic app router, lacks REST API service
configs
- configuration files
- nginx proxy full configuration
deployments
- docker deployment files
.env
+ .env.example
- environmental contants and vars for the app to run smoothly (in Docker via Makefile)
pkg
- app libs
pkg/backend
- REST API backend service
- service is used by WASM client for the app's running data fetch
pkg/frontend
- frontend pages
- go-app framework usecase
pkg/models
- various shared model declarations
test/data
- sample data used to flush existing container's data by
make flush
web
- static web files, logos, web manifest
- users must register (
/register
) or existed users login (/login
) - users can navigate to the flow (
/flow
) and read other's mind flows - users can modify their flow-list (list of followed accounts,
/users
) - users can change their passphrase or the about description in settings (
/settings
) - posts can be written and sent (
/post
) by any logged-in user - users can logout (
/logout
)
switchable end-to-end encryption (JSON/octet-stream REST API and LocalStorage for service worker)- in-memory runtime cache(s)
- data persistence on container restart (on
SIGINT
) - flow posts filtering using the FlowList --- simply choose who to follow
- can (partially) run offline
- shade function to block other accounts from following and reading their posts
- webpush notification management --- chose which notifications (reply/mention) is one's device willing to accept
- private acccount --- others have to file a followw request to such account (and have to approved by the acc's owner)
- API documentation is stored in
api/
root directory - the service is reachable via (
/api/v1
) endpoint - swagger live docs
# create env file copy and modify it
cp .env.example .env
vi .env
# build docker image (Docker engine mandatory)
make build
# run docker-compose stack, start up the stack
make run
# Makefile helper print
make info
# flush app data --- copy empty files from 'data/' to the container
make flush kill run
litter-backend
container can be run locally on any dev machine (using Docker engine or using the required tag-locked Go runtime)
make dev
http://localhost:8093/flow
make sh
ls -laR data/
data/:
total 44
drwxr-xr-x 1 littr littr 96 Nov 14 22:21 .
drwxr-sr-x 1 littr littr 24 Dec 17 20:58 ..
-rw-r--r-- 1 littr littr 2562 Dec 17 22:02 polls.json
-rw-r--r-- 1 littr littr 24309 Dec 17 22:02 posts.json
-rw-r----- 1 littr littr 1154 Dec 17 22:02 subscriptions.json
-rw-r--r-- 1 littr littr 11923 Dec 17 22:02 users.json
In the listing above we can see freshly dumped data from littr runtime. We can fetch it outside the container using make fetch_run_data
.
make fetch_running_dump
Copying dumped data from the container...
Successfully copied 13.8kB to /home/user/litter-go/run_data/
Successfully copied 4.61kB to /home/user/litter-go/run_data/
Successfully copied 26.1kB to /home/user/litter-go/run_data/
Successfully copied 3.07kB to /home/user/litter-go/run_data/
account deletion (settings
page)add timestamps on server, render them on client sideautomatic links for known TLDsautosubmit on password manager autofill (when username and password get filled quite quickly)break lines on \n in postscheck for double posting same content- custom colour theme per user
- dismiss any modal by clicking anywhere on the screen
fix update indicator checker (runs only on once after reload)(autoupdate)- implement customizable navbar items order
show offline mode notificationshow user's details on the top of /flow/ pageswagger docstest if dump dir writable (on init)(chown included in Dockerfile)
- fix the code smells as scanned by
sonar-scanner
- resolve tikets in github and redmine (priv)
- user activation via mail
- write integration and e2e tests
- [...]
add minor UI fixes (dialog buttons colouring)expand passphrase reset procedure --- add confirmation e-mail
improve SSE parsing on FEshow server is restarting notice
implement localTime mode switch to see post in one's timezone (by default on)improve user's flow (profiles) --- viewable in limits of following/shading/private acc
implement searching for flow using hashtags(wip)fix various bugs and typos (login, register pages; texts)(wip)
fix the flow-users glitch (new users' posts not seen in flow on other devices)implement private account logic(wip)allow picture-only posting
BE deep code refactoring(wip)write and fix swagger docs
implement mentions with notification to such user
implement subscribtion list item deletion- improve the UI/UX (review issues related to UI on Github) (wip)
implement Ctrl+Enter to submit posts like YouTubeunify the UI elements' border radius and their styling
add timestamp to a subscriptionlist subscribed devides on settings page
enhance the notification service
- implement mailing (verification mails) on backend
implement forgotten password recovery(wip)
implement combined picture-with-text (PwT) posting(wip)
implement simple loading/broadcasting of new posts(wip)fix single-post and user flow subpages on flow(wip)
add modal for post deletion confirmationimplement JWT for auth (wip)preprocess and paginate posts on backend (wip)
reintroduce/api/stats
route to simplify the stats pageuse a router (Gorilla Mux, Go-Chi)
fix flow reorganize glitch (single page, after post deletion etc) (wip)(fixed in v0.30.29)send frontend's tagged version to backend (improve user debugging)
implement simple notification service (wip)implement subscriptions (SubscriptionCache)show user's profile on top of the flow single page view
fix thumbnail multiple-loading on scrollimplement image uploading directly from browser
add avatar preview to settings pagefix local JS and CSS deps (hotfix via remote CDN)fix NaN% when loadingimplement custom JSON log wrapper(goroutine?)implement<details>
tag for posts longer than `MaxPostLength)implement shadow function (acc blocking)implement some user's stats on users pageshow selected user's posts only --- button/link on users page
add links to a single flow postshow replies (+history) in the single post view
implement user deletion (settings page)
add switch for light/dark mode toggleprofile icons on the flow page(with link to user info modal???)fix register date (migration)
- implement inf. scroll to stats (complex)???
replies to any post in flowadd simple ToS (terms of service)
ensure infinite scroll works properly with flow filteringdisable update button, autoreload on update insteadinclude infinite scroll topolls
andusers
implement infinite scroll (forflow
only this time)implement pagination for flow (on backend prolly)
implement user's profile (real name, home page, followers) as modalmark selected fields with data labels (data-author
etc)notice user's activity (User.LastActiveTime
)
upgrade toasts to snackbars (beercss v3.3.5)disable buttons on action to prevent multiple action firesimplement system stats, add flowers (follower) countadd LitterJS external lib
implement search bar (stats
andusers
pages only)
implement polls (create poll, voting)healthcheck as a periodic cache dumper
implement statsensure system user unregisterable by the app logic (not hardcoded)define data/users.json system users (regular users, but simply taken already by the init time)
implement picture posting(via URL)
implement functional flowList editting via UIimplement functional filtering using flowListfix dynamic stargazing and post deletion
fix settings (broken pwd and about text change)fix register when given user exists already
stabilize database(implement in-memory caches)fix layout (unwanted less-data page scrollingdump data on container restart/SIGINT
use local JSON storageimplementbackend.authUser
functional user login/logoutfunctional settings pagefunctional add/remove flow user
Go backend (BE) --- server-sideconnect frontend (FE) to BEapplication logic --- functional pages' inputs, buttons, lists (flow, users)