The Green Alliance banner

The Green Alliance

1 devlog
34h 41m 37s

Updated Project: This time, I worked on adding support for chat features, allowing for people, groups of people, and admins to chat and see messages in a robotics team, allowing for centralised communication and easy reporting of bad activity.

This project uses AI

I used cloud models a lot to kinda experiment with them. They mostly helped out with the admin portal, after I created the infrastructure and stuff the AI just made the display unit to show stuff. Still less than 30% most of the work was done on the frontend chat and backend stuff!!! look at the attention to detail to the ui please 😭

Demo Repository

Loading README...

atomtables

This is unfortunate that I wasn’t able to log all my work, didn’t know about Flavourtown before…

This release included the chat features, which I think are personally pretty cool!!! This has all the features that most chatting applications like discord have, where you can send messages, edit and delete, react, and make group chats. It’s themed to look like how Hangouts did back in 2015 (the entire website is themed to look like Material Design Lite anyway).

The easy bits I would say was getting the chats from the database. The hard part was probably actually getting them to update in real time. You see, I was using SvelteKit for this project, and unfortunately, SvelteKit doesn’t have a ton of features to help people out with real time data. Websockets and SSE are not native features.

Naturally, I would have tended towards the Websockets Strat for a chat. Discord and WhatsApp use it, so it must be good! Unfortunately, unlike SSE, Websockets also has no real helping support from the public either, and while I could have used the PR version of svelte that had WS added, that just got closed and dismissed by SK creators, so lucky I didn’t use that lmao.

SSE wasn’t all that bad though. Using SSE I would have messages to a user stream down to their client while they made REST requests through the API to interact with the chat. If a request was successful, it would be transmitted to everyone but the author (because the author knows the request was successful).

Attachment
1

Comments

atomtables
atomtables 11 days ago

I was thinking about group chat support from the beginning, and also wanted the tables to be efficient. Right now, a chat is defined by a table, but the participants of a chat are defined in another table. This way, you can use a join to get the participants in a chat, as well as all the chats a user belongs to.

There is no E2EE because the app is intended to be used for kids to talk to each other about robotics! so if anything bad gets sent, it’s in the best interest that it gets reported or held back. Admins can use the admin portal to see every message sent by a user, as well as view every chat, although they probably shouldn’t do this unprovoked. The admin panel is meant for network administrators, not coaches anyway.

The use of roles is nicer because features can be set granularly. Next steps are to include email notifications and stuff.