Cami
- 10 Devlogs
- 10 Total hours
A new (sillier) authentication service (with some extra trinkets and doodads) for all your authenticating needs.
A new (sillier) authentication service (with some extra trinkets and doodads) for all your authenticating needs.
Ship Time! I just added an AI test client, I am not disclosing this as AI usage in the project, as this really isnt the project, and is only meant so users (like me) with virtually 0 front end design knowledge, can just use this, now, in the web. THE CLIENT YOU SEE IS AI PLEASE DO NOT JUDGE AGAINST THIS AS NONE OF THE SERVER CODE (the true project) IS AI
#SSE Approach - This took so long, its not done, and quite frankly I’m so tired. Why did I chose sse? Compatibility with old hardware and, like most of my projects, learning and goofing around. This has the added benefit of making this all exclusively http, and being able to get integrated into my system of endpoints i already have.
Really nothing has been done. I spent a decent chunk of time trying to work with WS and just toughing it out, but I couldn’t get done what I wanted to get done. So I’ve made the bold, stupid, late-night decision, to switch to using SSE for the live chat. Partially so it can be more integrated into my already made systems, however, mainly just because I wanna learn something new.
Enjoy this picture of timestamps from me trying to learn Flask’s SSE.
quick one, added some more info to the live chat object, namely cmd and channel, this is in preparation for the channels system.
Worked on quite a bit this devlog. I finished up all the endpoints I would need, cleaned up the server code, made an init file to run it, and started on a live chatting system using websockets. It’s going to support an infinite amount of channels each able to be locked behind a password. However, except for maybe one general chat, no chat history is likely to be stored at this time, simply because infinite chats with no restrictions being stored, is going to eat through storage like mad. However for now it works. I was originally debating that each channel would basically have its own encryption, and then i realized… that’s dumb. I don’t need to do that, and here we are.
I worked on the social endpoint, and the reason it says it only took 17 minutes, is I switched to Zed, realized it doesn’t have Hackatime support, and switched back when already basically done lol. I made a little slop coded tool before I actually attempt to make something, even though any sort of interface to use it isn’t part of the project really.
Basically, its just a simple endpoint you can post to and get to post and read messages in a sort of twitter-esque environment.
Added a little thing telling you what port it was on, and then started it up! https://fries.hackclub.app/
https://fries.hackclub.app/
Yesterday I did a good bit of work on actually making it work lol. I did a lot of work out and about just on GitHub’s website, so when I came back there was a lot needed to get everything working. Mainly when I refactored some of the code into functions in a different file, I completely broke the login. But a little more in-depth about Cami. When you post {"username":"<str>","password":"<str>"} to either register or login, you get back a token. This token is based off your user-id and gets refreshed every time you login (also supposed to be after a day just unimplemented right now.) You then use this to authenticate with (the only commands that need it right now) /changepass or /updatebio. You can also, as shown in the image below, run /GET on /user?user=(username or user id). That’s pretty much the full run down honestly. Passwords are currently hashed with SHA256, although I need to find a better option as I was able to brute force reverse my 8 letter password on the web in <1 minute. :(
Cami - Cami is a silly goofy authentication program for use in my other projects.
It currently supports:
POST/register - Registering an Account
POST/login - Logging in to get a token
POST/updatebio - Updating your bio
GET/getuser - Getting user information from name or ID (returns fries [currency] bio and account #)
I am currently working on:
POST/changepass - Changing password
Implementing this into a chat system that’s websocket based
Adding little games and things
This was all done with primarily Flask (for the server), hashlib (for hashing passwords), and tinydb (for storage). It is meant to be lightweight, easy to integrate into other systems, and a fun project in general!