Cami
- 28 Devlogs
- 32 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.
AI generated a client so people can actually use it. Once again, I truthfully, have not used AI in this project for anything but front end, which I do not know how to do. Over the course of testing I have mainly used raw HTTP requests.
Well Cami has been rolling along reallllllllly quickly. Things I’ve added/worked on:
Playlists/More Music Stuff
Fixing up the post search api
Remake of ws chat server
Fries have been implemented
Fries transfer is working
Fries daily claiming is working
So many fixes (many things didnt quite properly handle errors and so they have been fixed)
Changes to your user info are being locked behind fries. (PFP Decor is locked but pfp, bio, and more will be locked, basically everything but password changes)
Image/Music uploading will likely be locked behind fries, or you will have to pay fries to upgrade the amount of stuff you can store.
More PFP Decor has been added to my personal instance but that doesnt affect here.
Server logs are prettier.
More info attached to the user queries.
Thanks for reading and sticking with this shitshow of a project.
Hello! I’ve lately been working on a music server. Users can upload any sort of audio file, mp3, ogg, it should support mp4 but i haven’t tested, and it converts it to an ogg file. The ogg file has a roughly 75% file size to the original MP3 while keeping the same quality. I’ve also been working on things like metadata storage, playlists, and more.
On top of music, I’ve started a full rework of the live chatting system. It’s been going well so far, but I’m changing up how it works a little. It’s going to be closer to IRC + DMs, there will be no locked channels, no way to create custom channels anymore. Hopefully I can also drag some more people in, and make it much simpler to use, and on top of this make it super easy to link to Discord and such.
So yeah! It’s been going well, I’m still alive, I’m running out of time to ship… and uh yeah! Have fun coding!
Quick one since its like 11pm, I’ve been working on a lot of fixes. I, since the start of this project, haven’t closed DBs. Think about that. I am an intelligent human being. I’ve also been working on getting searching working (image) for the social api, and making sure everything works with that. On top of this, everything is still getting organized, and made to have very similar responses, so as a dev less work has to be done for you to support it. I also kinda started on a python library, but eh, we’ll see how it goes I suppose. Also have been working on some security, nothing commited, to try to make it harder to hack ig.
Gn stardance! (im sick)
Been working on the project a bit. Mainly just working on docs and helping people understand the API in a more sort of private environment. Should push a ship eventually, and its gonna be super awesome for everyone! :D
Also maybe I did a devlog but i added timestamps to posts and stuff and made the total requests needed to do everything muuuuuuuch smaller, and made a smaller cache of data needed.
Auth Securely, Auth Silly <3
I’ve been doing a lot of work on simply normalizing some returns. Some of them were just slightly different like “The token is invalid” vs. “Invalid Token”, so those were condensed into “invalid token”, on top of this whenever i return a message i wrap it like: {"cmd":"success","message":"<original message>". On top of this I also went through and changed some of the codes.
Next thing I need to fix is any DB access needs to be routed through the helper funcs and properly closed. If you change your name, half the project still thinks only the original exists, while the other half, the correct half, only sees the new name. The reason is I have broken the project up into like 5 python files, 2 of which are both trying to simultaneously access the DB. Which, in-case you were wondering, is not good.
Something else I’ve been working on to prevent clients having to make like 3 requests for one thing, and to prevent the server from having to handle those, is to whenever a message is saved to the DB say from the social endpoint, when I send it back down, I attach the username and display name to it. This takes >2 http requests, get the messages then the usernames and user info, down to just 1. (Until you grab user pfps, which should be just grabbed once and cached.)
Because this is really all I did I like… don’t have pictures? So… Enjoy the little 88x31 I made 
Also this is probably the longest devlog I’ve ever made, but I’m bored, and since I just got 6 months of Spotify premium as a gift, I’m letting the weird AI DJ thing just play whatever it feels like. It does, however, keep going back to the dark ages of 2024. Let me forget that year of music listening…
Well hey! It’s been a hot minute right? Lately I have been working on a lot more fixes, mainly on things like the social endpoint, and the image endpoint. Not terribly visible portions right now, but majorly important! I also got a used RPI5 which is now hosting it. That means, no more Nest downtime issues resetting my code! Yay!
Notable Changes:
Started just adding more pfp decor, had some people make me some. Yippee!
Quick update: that’s not mine and I didnt get permission to use it, its the one i had for testing first because I got it from somewhere else real easily. It has since been removed, in favor for other ones I do have permission to use.
So basically this was just fixing a lot of weird things. For example, this being the main thing, the pfps stored whenever a user uploads them, get stored as 128x128. But the empty pfp, was 256x256. On top of this in some websocket things i was using "msg":"content" or "message":"content" interchangeably, but this has since been normalized. In all its just been a productive time, I’ve added a bunch, started working on a python library, and just gotten ready for ship 2!
Pretty much everything I have worked on this devlog simply involves fixes. “Oh, I’m not handling invalid json on a route, oops!” Or: “Oh usernames can be >32 chars because i messed up my if statement.” (I learned this one when someone with the entire bee movie script as their name appeared on my users route.) While it was all fixes I worked on, on top of this, due to wanting to commit roughly once every hour to keep people updated, I rewrote the empty path so it looks better. Link still points to the github repo.
Auth Securely, Auth Silly.
These have been wip and were quite simple to implement, display name is just another value in the TINYDB database for users, and so is the profile decor. I got it from another app so I can’t really commit it because its not mine, however it works! There’s no way to set it yourself I just hand edited the DB. Also, users can now edit their username! I know that was a massive complaint in the first ship. Past that really all I changed was paths. Before i had paths like /getuser?user=fries which was dumb. I figured out how to, with flask, make it /user/fries and it gives the same information. Much cleaner.
Livechat: So I’ve done a lot more on livechat, you can create channels
now (properly,) delete messages, almost have it so you can edit them,
and typing indicators are almost done.
Currency: I’ve started figuring out how users should get currency, and
what it should go towards. Right now, the main idea is get it daily by
posting/using livechat, then spend it on customization like user color,
or upgrading max bio length.
More public channels and locking!
I fully fixed and implemented the livechat. It supports the creation of channels with passwords, message history, joining channels, sending to channels you’ve joined. If all users leave the channel, unless its a keep-alive channel, mostly predefined channels with no passwords like general and off-topic, the database for message history gets wiped, and the channel is up for grabs again! I dont have any pictures really, I did it last night on a different PC, so enjoy an 88x31!
Gifs have been added to the image api. (I can finally new line again!)
Images you go: https://images.barfpile.dev/getimage/filename
gifs you go: https://images.barfpile.dev/getgif/filename.gif (you can remove the .gif at the end and it will work fine everywhere but discord. You can also use getimage on a gif, but again, will work anywhere but discord.)
(Attached gif was added by someone, idk who, while I was testing gifs lol. I am going to add basically metadata so you can get https://images.barfpile.dev/getmeta/filename and retrieve things like timestamp uploaded, filename, and who uploaded it.)
Images and livechat - I made an image api! You can upload infinite files, compressed to be 1/3 of their size ofc. Also started implementing live ws chatting with infinite channels that can be password locked.
https://server/getimage?filename=testimage
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!