- Twitter-Like
- Tweet, Retweet, Like, Reply
- Topics with #
- Follow & Followers
- Auth
- Supabase Db (with auth to be implemented)
- Postgres (for now as proof of concept)
- postgres-migrations - see: npm postgres-migrations: [https://www.npmjs.com/package/postgres-migrations]
- Zero-Cache
- Test Vite Auth Server
- Angular Front End
- Postgres DB Function Generates '#Topics' from Message Text
- FSM used on Modal Form for loading/managing EntityView State
- Bootstrap Style system with Dark/Light mode detection
- Filter Messages by Topic
- Filter Topics by Trending
- Filter Users by Popular Content
-
Implement EntityView State onto a 'View/Form Component' with API examples
-
Implement Data layer with a Sync solution such as Zero/Electric/PowerSync
-
Integrate States with a Form State (Schema & Field Settings)
- Schema is the DB Schema (fields, types, nullables, keys, etc)
- Field Settings is the custom configuration layer on the schema (Visibility, Validation, Disabled, Readonly, and other Meta data)
-
Build Prototype with Two different List views and entity views
- test how re-useable the Machine is, and how we would handle specific Entity Commands needs
- if this is simply spawing an child actor or just a new actor or just use gneric api calls for the specific use cases, while the generic use cases are completely re-useable.
- test how re-useable the Machine is, and how we would handle specific Entity Commands needs
-
Note: the big challenge here is to Refine the DB Migration process
- just a DB
- for larger scale manageability and DX - it may be useful to use Supabase
- generate your own migration files and run them against the PostgresDB using the admin tools
- use npm command on project root:
npm run migrations
- see docs for details: [https://www.npmjs.com/package/postgres-migrations]
- a standalone server running the Zero-Cache service
npm i
npm run dev:zero-cache
- todo: test and verify the schema migration process according to Zero's reccomoendations
- Vite/Hono http server for generating login cookies
npm i
npm run dev:ui
- a proof of concept Client UI running a "Twitter Like" application
npm i
ng serve
- Xstate for EntityView State management
- Zero Client for Data Sync
- Angular-Zero wrapper for convenience
- Bootstrap for UI Classes/Styles
- NgBootstrap for Angular Bootstrap Components
- Expand/Migrate/Contract method
- peform DB schema migration first
- should be back-compatible with running clients
- run
zero-deploy-permissions
- update and deploy code using the new schema
- after some grace period, run the 'contract' migration to remove obsolete tables/columns
Gudie for setting up a VPS with Docker Stack: [https://www.youtube.com/watch?v=fuZoxuBiL9o]
- generate docker images for all relevant services
- use the images in your stack file (actions will trigger a stack deploy)
-
see: pipeline.yml for example test stage
-
GH Actions
- on PR: run tests
- ng test on the web image
-
see: pipeline.yml for example build stage
-
GH Actions
- on push to main
- BUILD step
- trigger angular client image build and tag
- Run Docker Stack command to deploy the Services on the Remote VPS
- trigger zero-cache-permissions deploy
- needs access to the 'private' schema file
- Run DB Migrations
- trigger zero-cache-permissions deploy
- schema file needs to be accessible on the zero-cache container
- we dont want to rebuild the cache server with a possibly unchangned schema file
- copy the schema file into the Zero-cache container (build script)
- QUESTION: can we run a command on each docker stack deploy?
- pass in the commit hash and fetch the file from GIT via api key?
- run zero-cache-permissions against this new file with the custom bash script (using env params)?
- we dont want to rebuild the cache server with a possibly unchangned schema file
- Angular Client uses dev server to watach and rebuild
- zero-cache permissions must be run manually (npm run ...)
- postgres db migration must be run manually (npm run migrations)
- Update Client
- Migrate DB (expand,migrate,contract)
- Deploy Cache permissions
- OnPush to Master: Github Actions Test/Build/Deploy
- alternate: on Create Release