A simple nanoblogging platform for a raw mind flow.
read more (a bit more verbose documentation post)
- embedded in-memory cache system
- data persistence on container's restart (on
SIGINT
) in Docker volume(s) - flow posts filtering using the FlowList --- simply choose who to follow
- shade function to block other accounts from following you and reading your posts
- webpush notification management --- choose which notifications (reply/mention) is your device willing to accept
- private account --- others have to file a follow request to such account (and have to approved by the acc's owner)
- swift client side (a WebAssebmly binary)
- safe photo sharing --- EXIF metadata are removed while image file is uploading
- passphrase reset via e-mail
- dark/light mode switch
- live in-app event (SSE) notifications --- get alerted when a new post/poll is added to your flow --- to be toggable soon
- API documentation is stored in the
api/
root directory as Swagger JSON-formatted file - the service is reachable via (
/api/v1
) route - swagger live docs
- users must register (
/register
) or existed users must login (/login
) - users can navigate to the flow (
/flow
) and read other's mind flows - users can modify their FlowList (list of followed accounts,
/users
) - users can change their passphrase, the about (bio) description and many more (
/settings
) - polls/posts can be written and sent (
/post
) by any logged-in user - users can logout (
/logout
)
# 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
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/views
- 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
littr-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:8080/flow
Debug pprof
's index: http://localhost:8080/debug/pprof/
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/littr/run_data/
Successfully copied 4.61kB to /home/user/littr/run_data/
Successfully copied 26.1kB to /home/user/littr/run_data/
Successfully copied 3.07kB to /home/user/littr/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)
- [...]
- add controler+service+repository experiment for
polls,users, posts (wip) - live switch implementation (disable SSE)
redesign the flow subviews (profile pages)reimplement JS fetch() function to omithttp.Client
from FEsave new post/reply drafts to localStoragewrite integration/e2e tests draft(wip)
fix the invalid overally metrics states after the backend reloadimprove the API logger (add the request time at least)refix the avatar URL migration procedure(wip)reimplement the SSE client in Go(wip)single poll referenced by ID (singlePoll subpage/view]user activation via mail(wip)
design and implement new Token model(wip)enable cache metrics gauges
fix the streamer: event type broadcasting
refactor mailing on BEunion options under the umbrella user.Options map(wip)update swagger docs, ensure proper params, inputs, responses etc are valid(wip)
deeply refactor BE+FE again: declarative syntax for BE loggerimplement 5s toast's appearence (autodismiss)(wip)unified clean API response (wip)
pagination for pollspagination for usersrefactor FE (wip) --- polls, users, settings, register, reset, tos, welcome, login, flow, postuniversal paginator on BE
convert GIFs to WebPse-mail duplicity check for registrationintroduce the hideReplies feature
fix avatar image uploading, resizing and croppingimplement Esc key to close toasts and modals + Ctrl-Enter for other inputswelcome page
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 littrJS 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)