Commit Graph

68 Commits

Author SHA1 Message Date
efim e4edffd69f feat: allow setting tls on nixos 2023-10-09 03:22:58 +00:00
efim 7dbcc63394 refactor: using cool NixOS option for nginx 2023-10-09 03:16:33 +00:00
efim fe9794a796 nix: fixing the module
for some reason config = lib.mkIf didn't work over whole config, with
'infinite recursion'
Setting particular parts of config helped.

Then - trimming user and group name to under 31 symbols
2023-08-06 17:17:06 +00:00
efim 24b42352b3 nix: nixos module for backend installation
systemd to run service, nginx config bundled in
2023-08-06 14:02:04 +00:00
efim 81f466ceb0 nix update 2023-08-05 15:21:28 +00:00
efim d54d35eed1 docs: local and prod execution 2023-05-07 19:53:31 +04:00
efim 57618b268d feat: styling cards as fan, tailwind + css vars 2023-05-07 19:35:03 +04:00
efim 3dab3f66b9 feat: styling cards as fan 2023-05-07 18:25:54 +04:00
efim ba58a13e6a docs: license, readme and renaming into Kazbegi 2023-05-06 19:26:50 +04:00
efim db65777780 feat!: display room name
BREAKING CHANGE: protocol now expects room name attribute
2023-04-30 09:55:49 +04:00
efim e2795edbe6 bugfix: (not full) overlapping other players 2023-04-30 09:55:25 +04:00
efim 346069ae96 bugfix: disallow joining room without nickname
and also creating a room without a name
maybe maybe spectatorship sometimes later
2023-04-30 09:39:41 +04:00
efim bbabeb6c14 bug: secure cookie is not allowed without https
and mvp deployment without tls, so it doesn't work
2023-04-30 00:58:24 +04:00
efim 65879e092a small prettification of join room component 2023-04-30 00:14:44 +04:00
efim b06baf8c63 header and leave room button prettified 2023-04-29 23:00:15 +04:00
efim d4eae63166 initial backend nix build - get jar 2023-04-29 19:43:17 +04:00
efim ba625d738e styling and animation of own card controls 2023-04-29 12:34:42 +04:00
efim 340fcdcf41 other players styling and cards calc logic 2023-04-28 21:20:09 +04:00
efim 76303ba097 table view prettier no-vote error display 2023-04-28 20:53:49 +04:00
efim a690189f02 positioning card name label 2023-04-28 20:44:36 +04:00
efim a87f4f99c0 add display of the name on the open card
to make disambiguation on the viewing round simpler
will style this later
2023-04-28 11:58:48 +04:00
efim d7d4e2be9d bugfix: need to recognize owner after relogin
playerid is not stable right now, need to use nickname
2023-04-28 11:54:51 +04:00
efim 3158a75f5d bugfix: leaving room needs to clear votes 2023-04-28 11:43:59 +04:00
efim 867b2f0f20 auth giving out actual random seesionId 2023-04-28 10:11:36 +04:00
efim 62d63546c4 adding alpha create room capability 2023-04-28 10:08:04 +04:00
efim e1364c9b9b simple routes mapped to room service 2023-04-28 09:28:57 +04:00
efim 8098f24552 rooms service methods implementation
removed stubbed room, but thing compiles and maybe will work?
lot's of pain with trying to store Topic inside Ref together with Room.

storing them together in a tuple means for the room there should always
be a topic
but then modifying the room in side of ref is uncomfortable, because i
want to do F[Unit] send updated room together with room modification,
but Ref seems to take in only pure function to update the value

there got to be maybe some semaphors or something like that?
and storing topics where? in a separate state?
that would maybe simplify things, but i'm coding well into the night and
that's not a good idea really

now before testing this with front end, i need a way to create a room.
2023-04-28 02:54:15 +04:00
efim bd38a29b6d backend: move roomService usage to httpService
no longer used in auth module,
ready to connect rest routes to room service
2023-04-28 00:46:25 +04:00
efim ed6d30ec42 models: separate backend room model
not viewable on front end, since doesn't have json codecs, yay!
2023-04-27 22:17:47 +04:00
efim da9b96de84 own hand control - adding interactivity 2023-04-27 21:36:06 +04:00
efim 9a27a5c943 own controls - hide own active vote card 2023-04-27 21:21:02 +04:00
efim 11e65c009c add very dummy own card controls 2023-04-27 21:07:35 +04:00
efim 107e7507f4 front other players - move to separate file 2023-04-27 20:58:53 +04:00
efim ecb1717eb3 front: simple table control buttons 2023-04-27 11:57:20 +04:00
efim f8bf1b961b new logout button
triggers /api/logout and updates app loggedIn state
2023-04-27 10:34:40 +04:00
efim 9db42cb522 connect login and room pages via logged in state
moving websocket into being managed by the room component.
if the partent would want access to "user signal" it can ask via
observer.
that would mean bidirectionality, and i already hear screeching of my
intuitions from react, but maybe that's ok and in react i would still
scope the websocket to the room page, plus callbacks
2023-04-26 22:32:53 +04:00
efim 90e886c62d new Join Room form that requests authcookie
getting stubbed session #1,
with auth module stubbed to accept that session in.
and stubbed method for streaming room state,
but that's enough to start testing room calling api's for other actions

next - pass in observable from parent to re-toggle subscription
websocket after successful login
2023-04-26 11:42:40 +04:00
efim 1f28a03d47 temporarily hardcoding backend room and session 2023-04-26 08:56:51 +04:00
efim 6c1220b544 more initial impl of auth utils 2023-04-26 08:39:43 +04:00
efim b29d1a1ef1 new auth method for joining room 2023-04-25 12:17:37 +04:00
efim 1b71c942ec adding room service, joining room
adding nick password into model, stored in the Room
to allow more secure joining for repeated times
2023-04-25 11:41:32 +04:00
efim 2244f38348 scalafmt all 2023-04-25 10:25:36 +04:00
efim 0a721b135f stubbed auth with tagless final 2023-04-25 10:23:13 +04:00
efim 64267a5f67 backend - adding room service and wiring
preparing to create a better auth module that uses room service
2023-04-25 09:55:45 +04:00
efim dfff814079 cleanup 2023-04-25 09:45:21 +04:00
efim 62a4b265c2 fix vite plugin configuration for mutliproject sbt
without 'projectID' vite plugin uses root project to run fastLinkJS
and that results in `import scalajs:main.js` attempting to import
common/.js/main.js which does not exist
2023-04-24 09:17:32 +04:00
efim 8716385ea1 adding fork := true for backend server interrupts
without it app starts in same jvm and we're told that Ctrl+C will not
always kill the Ember server:

https://typelevel.org/cats-effect/docs/2.x/datatypes/ioapp
WARNING: If you run your IOApp program from sbt, you may observe cancellation and resource releasing is not happening. This is due to sbt, by default, running programs in the same JVM as sbt, so when your program is canceled sbt avoids stopping its own JVM. To properly allow cancellation, ensure your progam is forked into its own JVM via a setting like fork := true in your sbt configuration.
2023-04-23 23:35:45 +04:00
efim 77b34a2ca7 change Map to List in model, scalajs didn't decode 2023-04-23 23:15:59 +04:00
efim f3e51a4750 fixing websocket, it was misspelled port
wow. just wow
2023-04-23 23:01:51 +04:00
efim 5ac864f15e not working: attempt to stream in websocket
added Vite proxy, tested with websocat, with direct js websocket.
the error seems to be Laminex related
2023-04-23 22:22:02 +04:00