Logpheus banner

Logpheus

66 devlogs
88h 30m 46s

Flavorpheus but actually useful! It's a generic flavortown bot used for automatic devlog posting to a channel, looking at projects shop items users and more! Check it out by using /logpheus-(commandName) in the Slack! You could also self host it i…

Flavorpheus but actually useful! It’s a generic flavortown bot used for automatic devlog posting to a channel, looking at projects shop items users and more! Check it out by using /logpheus-(commandName) in the Slack! You could also self host it if you want to.

This project uses AI

I used AI for debugging sum dumb errs like Zod validation errors which was dumb also to figure out my dumb mistakes of making a bit of n+1 db queries but it was mostly made by me Gizzy!

Demo Repository

Loading README...

Your Friendly Neighboured AVCAP Member Gayzzy

Shipped this project!

Hours: 2.41
Cookies: 🍪 76
Multiplier: 26.34 cookies/hr

Logpheus now fights back if your rude to it i also did sum bugfixing when slack returns mrkdwn in arguments and made sum visual fixes to look less weird and lket user known of issues when issues with automated devlog post

Your Friendly Neighboured AVCAP Member Gayzzy

Yknow Logpheus, you’re favourite bot?
Yeah be rude to it and it now fights back sorry to say but logpheus doesn’t take shit from the haters

  • Uses HCAI for Responses to any message with prefix!
  • Fix download image failed from sending to my sentry i did make fix before but it disappeared hs
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

New Devlog, who dis?
ITS MEEEEEEEEEEEEEEEEEEEEEEEEEEE 3c

  • Slack’s mrkdown in commands break slash command args so i had to fix that
  • Swapped devlog command to use header block instead of section for saying waht devlog id it is
  • Add hackatime badge to readme
  • Fix quote escape for basic devlogs with 0 mrkdown and other stuff like it
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Who’s my good little reader? You are! You are!
I did sum things

  • Logpheus now speaks to you if you say a certain thing like “logpheus” or “logpheus is the best”
  • Alerts user of error posting devlog instead of failing silently
  • If error is img download err tell user not me smh
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Shipped this project!

Hours: 1.53
Cookies: 🍪 38
Multiplier: 24.59 cookies/hr

I need the ship sticker so making ship with just bug fixes idrc abt voting ngl so TAKE MY PROJECT voting. ANYWAY THIS IS LOGPHEUS the only slack ft bot ITS ORIGINAL dumb voters this is the only bot with automated devlog posting, the only one in the slack anyway enjoy it ig i did ass in voting last time cuz yall cant read so cope this time for anyone who votes bad THIS IS A SLACK BOT FOR INTERACTING WITH FLAVORTOWN IN THE SLACK LET ME MAKE THAT VERY CLEAR I MEAN CLEAR IF I GET ONE VOTE SAYING IT WASNT CLEAR I WILL EXPLODE IT ALLOWS PERSONAL CHANNELS TO GET THEIR DEVLOGS POSTING IN THEIR CHANNEL ALLOWS PEOPLE TO VIEW THE SHOP USERS ACC USER PROJECTS USERS PROJECT DEVLOGS IT IS SO CLEAR NOW

Your Friendly Neighboured AVCAP Member Gayzzy

A THIRD DEVLOG?! ITS SHORT LIKE YOU BUT STILL HEHEHEHEHEHEHE 3c
MREEEEEEEEEEEEEEEOW
Literally one update quack

  • /logpheus-devlog now includes latest [projectId] as well as just devlog id as it was pmo that i had to manually search for the latest devlog id when I CAN LITERALLY AUTOMATE IT
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Ogay well devlog 2 for today 3c

  • Added user projects api to the api file and type so i can use it in logpheus stuff
  • Make use of new api to complete feat #13 where logpheus-add imports all projects of user if they provide no project id to make it easier to setup
  • Made annoying “Zod validation failed” easier to fix by providing name of what schema caused it in the logs
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Weh I fixed sum stuff 3c

  • Fixed prefix showing as undefined not the actual prefix (404 ss was before the fix i cant get one with it)
  • Fixed projects that was deleted and 404ing from spam,ming sentry because they was gone
  • Fixed quote showing on projects with no description on add
  • Hide user id in the title of view command
  • Fixed stinky poopoohead of the video hyperlinks not being hyperlinky cuz they was mssing the closing “>”
Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Shipped this project!

Hours: 84.57
Cookies: 🍪 1911
Multiplier: 27.58 cookies/hr

I built a generic flavortown bot for the slack with currently 39 active users! It’s called logpheus you might of heard of it if you chat in #flavortown. It was semi challenging to make this (because the slack api sucks) and I also got to beg cyteon (ft dev) to make PRs to make the API better for all api users not just logpheus. This was my first slack bot I made and my first time using drizzle I had to learn how to use it and it turned out to be pretty nice to use. This was a pretty fun project to make (part from the 6 am wake ups to find out why prod broke) so I hope you enjoy this ship to.

Your Friendly Neighboured AVCAP Member Gayzzy

Woah is this that time already? It’s the last time too before the new ship I believe. So here are the changes chat agabye this journey was great most of the stuff after this probably wont be in a ship

  • Removed old db migrations from different dbs
  • Fixed drizzle not following strict typescript
  • Fixed huge n+1 with project map hitting db on every user doing opposite of optimising it
  • Included manifest from slack, update readme to show bugsink stuff

Changelog

Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Guess who’s back. Back again. ITS ME SILLYYYYYYYYYYYYYYYY
HAIIIIIIIIIIIIIIIIII I DO ANOTHER DEVLOG

  • 10x improved the projects command as it now has a better query system using –limit and –query for options and no – for just search and it no longer uses slack’s table block which was broken it is actually usable over 10 projects!
  • Updated zod types for FT API
  • User command now shows achievements yay
    OKAY BAIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Woah another devlog? This is so figma balls

  • Ratelimit on API so no stinky people can ruin it
  • Updates README so it makes sense for new version
  • Bugsink error cmd now so you can see if any errors logged yay
    OKAY BAIII CUTE PEOPLE 3c
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

It’s about time I meow at you cuties :3c:

  • Fixed cookie predictions as i made it user base not project base causing predictions to be wrong i also made it store in db with user current cookie amount + predicted contributing to issue
  • Feature and Bug Report commands added :yay:
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Woah a qucik update? This is just bugfixing mostly but yayayayayay som-duck

  • Fixed docs using Goals request body instead of Multiplier request body
  • Multiplier was written stupidly by me I made it user specific not project specific so I had to change API and DB to store in projects by making projectId requirement now in API requests
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

New devlog who dis? ITS ME YOU SILLY GOOSE! ANYWAY UPDATE TIME yayayayayay

  • Sabio begged me for new api so they can give me project multiplier idk if ft utils would implement api but sabio said they would add it to spicetown
  • Oopsie lets not add region again instead lets overwrite so it changes not causing issues
  • Added new api to DOCS yay
  • Added tags to docs to make it clearer then it all being under default
  • Move api routes to seperate files as index file was getting fat
  • Set vikunja stuff optional so self hosted instances dont need vikunja to run
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

3 hour devlog? YIPEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE yayayayayay
I spent ages just making 2 command cuz node-vikunja kinda sucks to use

  • FEATURE REQUEST COMMAND SO YOU CAN REQUEST FEATURES
  • Report command to report when logpheus is being a meanie pants and refusing to work properly >:(
Attachment
Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Not much of a devlog but still worth a post so yes yesyes

  • Goals are now on the shop command!
  • Decrease shop item limit on shop command cuz slack sucks have to wait for cyteons pr to get ?limit= to create a pagination fix for this
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Woah a new devlog?! YIPEEEEEEEEEEEE

  • FIxed shop command not grabbing region correctly from meta
  • Goals command to see your goals remove and add
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Yknow this isn’t even really a devlog we went back in progress

  • Goals on devlog post cuz yes thats sigma
  • PUT request bug fix as it only showed goals given to api not updated db
  • Drop embed support for videos as it never worked and prob will never work because well thats just say I have never seen an api more idiotic then what slack has made I seriously hope slack rebuilds their api from the ground up because whoever made it in the first place failed miserablely at supporting video
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Woah woah woah did someone say a new… a new devlog? WOA AWOW THIS IS SO SIGMA
Yall get a new devlog you cutie pies 3c

  • Help command so you can see command params and command descriptions easily as slack kind of sucks for slash commands!
  • Devlog command so you can see a devlog’s content in the slack yay
  • Zod infer types for ft api functions as not being able to see what needed to provided was annoying meeeeeow
    OKAY BAI CUTIES TILL NEXT DEVLOG YOU CUTIES
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

This devlog is all just bugfixing and optimization so it works better with a lot of users

  • Make the user check for automated posts more specific to not include regular users
  • Decrease N+1 DB queries with prefetching projects and users and search using maps
  • Fixed logic error where 1 bad handler could break all handlers
  • Lock mechanism to prevent reruns of handlers when a handler is still running
  • Dropped old 2s wait used for ratelimits as new ratelimit handler
  • Keep parseMarkdown regex in mem already loaded so slight improvement on bursts from automated devlog posts
  • Use utcFormatter which is already in mem as slight benefit on resources for each devlog post
  • Drop clients if none in userRows
  • API now reuses ftClient if it already exists in clients
  • Fixed videos not working because misisng title and thumbnail
  • Don’t hit db for data we already have
    In docker it didnt drop mem usage by much only around 16mb which is still nice and it did drop idle cpu usage a bit but still bursts during activity it mostly just improves speed for user for posts
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Only 45 minutes? For all this commits? crazy i know right… ANYWAY HAI CUTIES IM DEVLOGGING Again 3c
This is mostly bug fixing based it has new stuff but thats part of fixing issues for users

  • Fixed region text to be more specific on format so users know how it needs to be to get it to work
  • Reactivate command so you can get undisabled in db once you fixed an issue as config command makes u update something to reactiavte and logpheus not being in channel just requires being added to channel to fix
  • Use more prefix based text instead of “logpheus” so it makes more sense on self hosted instances
  • Disable users from automated posting when logpheus not in the channel
  • Log on API so it shows in sentry and is useful then not making sense to debug
  • use ctxLogger on timer based handlers because without it wont know what file is causing it
  • Removed debug console logs i left in qwp
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Whoops didnt mean to go this long its a 1 commit update! giant commit tho

  • Swagger API Documentation for /api/v1 on logpheus
  • Goals API so FT Utils/Spicetown can give me your shop goal data
    A lot of this was making goals api and also trying to get swagger to work with boltjs custom routes as slack sucks
Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Ts a basic ahh devlog but i mean hey i need the HOURS GRRRRRRRRRRRRRRRRRRRRR

  • Fixed bug in data command causing double “:” to appear
  • Add command now accepts a param for project id to make it less inconvinent adding it
  • log better in prod to see why unexpected project response error cuz idk why that happens
  • Fixed remove command not working for set id and removed remove all option as thats just revoke and it doesnt delete user from db now as revoke does that
  • Data command now includes metadata
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Quick bit of coding before I catch the bus 3c

  • Hopefully fix the issue where it says unexpected error from api as no status code
  • Revoke command to remove yourself from logpheus with ease if u want to sadly
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

I did some stuff 3c

  • Some how THE CHANNEL CREATOER REQUIREMENET STAYED EVEN THO I KNOW I REMOVED IT GRRRRR
  • Spelling mistake in region text in config view
  • Zod error in shop for item id as it sent string not number
  • Hours of project based on devlogs ;3c
  • Devlogs function checking params for query throwing zod error
  • Predicted cookie amount (based on avg of 10 cookies per hour not previous ship cookies)
  • Ping groups are in wip
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

This devlog really isnt that much ngl I just spent the past hour and a min cleaning up old code to make the codebase less complicated so

  • Dropped add command taking in api-key for new comers the register commands and its easier to maintain one command for adding a new user to logpheus then 2 ways
  • Made views and commands more reliant on checkAPIKey function so less code in every file for doing the same check everytime
  • Cleaned up register command to also use checkAPIKey but also easier maintability as changed way from spam of if statements by using a obj with type UserInsert to add to it and added ability to add region on register
  • Both config and register command now has hyperlink leading straight to flavortown’s api key setting box to make it easier for user to get
Attachment
Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

I did a bit of updates :3c mainly to shop command but some other stuff too SO LETS DEVLOG yay

  • Shop command now has region based showing (if you have a region set in /logpheus-config
  • Config command now prompts for a region 3c
  • New meta column on users standing for metadata on users for stuff like regions
  • CheckAPIKey returns db row too now so I can use it without new db call when data was already grabbed during that check
  • Log Zod issues in bugsink now
    LETS HOPE WE DONT BREAK PROD WITH THE CHANGES yay

ps: matei if your reading this you are a cutie pants

Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Woah more changes IM LOCKED IN CHAT LITERALLY LOCKED IN AAAAAAAAAAAAAA HELP ME THEY LOCKED ME IN HERE IM TRAPPED IM STUCK GET ME OUT PLEASE LET ME OUT

  • Fully changed to Zod for requests so thats sigma it points out my dumb mistakes more
  • Finally handles http codes set out by docs mostly some stuff still no i dont think
  • Changed shop command to not use disgusting slack table and also push it to prod
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

I mainly just worked on the code conversion in this update so it all uses ZOD NOW yay
The zod types autogenerate off of the openapi spec the use of scalar makes which flavortown now uses so MY BAD CUSTOM TYPES ARE NO LONGER IN USE WE USE ZOD yay
I also made the basic api data check better as it was kinda hard to understand and messy before

Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

I should devlog right about meow so HAIIIIIIII x2

  • Added da shop command so you can run /logpheus-shop [id] to view shop items and the id to look at a specific shop item just not pushed to prod yet (This is still a WIP i will be changing away from using slack tables because they don’t actually work properly so you can’t view whole table)
  • Config command was still channel restricted which was meant to be dropped a while ago so I dropped it just need to push change to prod
  • About to wip a /logpheus-help command to view all commands because I know slack can kind of suck to show all logpheus commands
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Wow this is a short update 3c so I ASKED FOR A PR AND IT GOT MADE BY CYTEON WE LOVE CYTEON CHAT YAY THEN IT GOT ACCEPTED AFTER A WEEK BY NEON WE LOVE NEON
so now

  • Attachments on devlog posts 3c
  • Fixed checkAPIKey failing when trying to change api key in config command due to it not being able to find you as it used the new api key you are providing to do the check not old one
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Rawr not much changes just bug fixes

  • Fixed code in parseMarkdown thrown type errors as I didn’t updat to strict
  • Shut up loadHandlers as it failed dupe check every min spamming console as already registered
  • Fixed throwing error on empty optional env
  • Removed sum debug stuff
  • Fixed prod explosion cuz commands didnt work as bug
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

I did some things 3c

  • It now redacts sensitive info in logs as it didn’t before
  • Improved FT API Handler so that I can easily modify it without it being annoying
  • Made it throw an error on dupe handler names as I keep accidentally not changing the name
  • Changed to use lib of checkAPIKey instead of manual implementation for each handler
  • Enforces strict typescript so that its easier to see issues in files
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Since I forgor to devlog my changes yesturday/day before I’ll devlog it today for you cuties 3c

  • Fixed the disabled message not getting posted which caused people not to get alerted when bot broke for them as unauthorized
  • Wip of Projects Command mostly working but slack hates long tables idk how to fix that and still needs to fix pagination on it
  • System information on the stats command now
Attachment
Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

58 minutes for this? Damn peak! ANYWAY UPDATE yay

  • I added a drop command to make dev testing easier allowing me to drop data in db ONLY ON DEVPHEUS and only people with MY SLACK IDS so can’t happen on prod
  • Dropped sentryEnabled mostly everywhere as logtape is now used so I do the check if sentryEnabled in the sink so if its not enabled it uses console and if it is enabled it uses sentry

Changelog

Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Quack another devlog colon three 3c
Update not really that big but still I need the hours

  • Increased deployment speed on builds from new commits by making apk (alpine linux package manager) cache and use the right bun cache location
  • Added MP (Multi-Platform) Dockerfile as I think my changes are really platform specific to alpine as I used apk cache folder on host too as my server runs alpine linux so to ensure other instances don’t break they can use MP
  • Updated the README to reflect new changes for docker with the MP but also to reflect the change in code for chosing how the prefix is chosen
  • I made the markdown parser more maintainable by swapping from a bunch of if’s to a switch statement and not using a bunch of numbers with match[] to find it and instead using match.groups! for group.,emoji etc so it actually makes sense
  • Fixed FT Utils emoji handler on FT messing up Logpheus’s emojis as it uses it was links so I had to make a parser to look for emoji.slack-edge.com and parse that for emojiName to use emojiName for emoji in slack

I LIED THIS WAS A BIG CHANGE BOZO GET LIED TO bleh

Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Yeah I should probably devlog 3c
HAIIIII FLAVORTOWN VIEWERS AND QUACKERS som-duck
so this time was literally spent on literally debugging

  • I bwoke prod of logpheus so I needed to debug and a lot of the debugging was kinda vague so I swapped over to logtape so I can get better drizzle logging in sentry and also allow me to log easy with sentry
  • I added a lot of debug stuff to prod to see why it was down and found out IT WASNT MY CODE YAY it was a psql misconfiguration causing it to not allow wireguard connection
  • I moved prod back to server with db as db reqs was slow but now there is more chance of slack timing out requests but ig cope i want fast db requests not slow ones
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

HEYYY ITS ME FINALLY AGAIN ima just say the changes i made today as i cant remember all of the stuff i fixed a hwhile ago JESUS 17 DAYS SINCE LAST DEVLOG DAMN

ANYWAY

  • The logs was pretty vague especially for drizzle so I swapped to logtape to log all drizzle stuff to sentry enabled breadcrumbs to help debugging even more
  • Swapped the contexts to use logtape so its even better for contexts
  • Broke prod logpheus because slack broke saying i didnt own bot meaning i couldnt work on it adding new commands n stuff so i had to kick it from the workspace remake new account
  • DMed all private channel users about the kick so if they want to use it they just have to add it back and for public channel users I added it back for them
Attachment
Attachment
0
msw

Tagged your project as well cooked!

🔥 msw marked your project as well cooked! As a prize for your nicely cooked project, look out for a bonus prize in the mail :)

Your Friendly Neighboured AVCAP Member Gayzzy

Chat, are we codemaxxing rn? no stupid we are bugfixing dumb ahh

  • Fixed my channel being spammed in dev cuz i dropped project table by adding fallback to checker to prevent that
  • Fixed sentry context not being included in commands/views sending sentry errors
  • I realised slack modals have private metadata and also has body so instead of manually parsing the channel and user id through view i used that to hide it from user
  • Idiotproofed the bot more because people somehow keep using other self hosted instances so now titles of modals use prefix as title which is different on every self hosted instance and for offical prod its just logpheus so if you STILL use wrong instance you are dumb nothing to say more about that
  • DATA COMMADN TO SEE WHAT DATA LOGPHEUS HAS ON YOU YIPEEEEEEEEEEE yay
  • Config command not channel specific now it uses user id to update api key
  • Tells user that prod exploded instead of ghostting them when it does
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Almost 3 hours again GOD i kinda forgor was gonna do one this morning but devlogs was done ANYWAY

  • Register command and project command to register to use bot as general purpose just for its commands, user to get a persons profile and project to look at project by id bleh
  • Bug fixes such as shutting up the error logged when FT did a restart or anything like that sickbro
  • Drops disabled clients from saved clients arr because they are disabled
  • More bug fixes as an FT api route changed without me knowing breaking the bot so had to fix that and fallback so if it happens again it logs to sentry as sus sussy
  • Did a update to readme to match new stuff yay
Attachment
Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

oop 3h already past jesus anyway
i fixed sum bugs
user command! get someones ft profile from sometimes slack account
opt outs column for something soon owo

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Another time for a devlog!!!!!!!!!!!!!!!!!!!!!!! BLEH :hyper-dino-wave:
I spent most of the time improving the error handling of logpheus so it makes use of MY BUGSINK MOREEEE and its more specific with errors so now if it isnt 401 it doesnt default to no project exists at id it only does that at 404 :3c with MORE CONTEXT TOO so better easier debugging

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

uhm pushed to prod the changes i madeto table etc fixed sum stuff took down prod for like half and hour as u do so fixed that because of dumb migration issues bleh but it does make use of new tables now for data not all data in new tables tho like last devlog timestamp or the store of user ids so i need to manually add uids in for users previous to the update but also change it so it stores and uses last devlog timestamp as main check and fallback to id check if need be

Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

bleh more time for me! I did sum cleaning moving devlog check to sept file and no longer rely on loadApiKeys which is super overkill for 1 function using it since func was legacy code used a lot before changing to drizzle etc

Attachment
2

Comments

sabio (USE SPICETOWN)

please ignore this comment :hs:

Your Friendly Neighboured AVCAP Member Gayzzy

uuh wattefigmaballs comment is ts stinky pants

Your Friendly Neighboured AVCAP Member Gayzzy

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
I work on moving schema :3c and also cleaning up the codebase so its more readable as ts confusing also improved schema migration by learning how to actually use drizzle frfr

Attachment
1

Comments

Your Friendly Neighboured AVCAP Member Gayzzy

Well uhm this was a crazy one, a self hosted instance caused offical to die because of how slack handles slash commands its extremely secure setup allows other bots to overwrite the slash commnads you have to their own and dw it does the exact opposite of telling user this it still shows that the command you are about to run is from the offical bot so i had to modify it so self hosted instances now use user id and bot user as prefix to fix it also updating schema to work more efficiently then and clean up code

Attachment
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Mreowwwww! I’m literally just improving logpheus handling of issues to use bugsink to post errors so I can read but also handle 401 errors better so I’m not being spammed with errors because you guys being annoying with your api keys

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Bleh not devlogged this in a while but i got time so might aswell
Fixed bugs!

  • You can now add multiple projects to one api key as fixed bug preventing this
  • you can no longer be a stinky and try add the same project twice under a api key
Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Shipped this project!

Hours: 13.12
Cookies: 🍪 258
Multiplier: 19.66 cookies/hr

Made a few changes to improve the bot blehhhhhhh

  • It now makes use of postgres in prod and pglite in dev using drizzle
  • Validates api keys given on add or configuration
  • fixes sum bugs in the bot
Your Friendly Neighboured AVCAP Member Gayzzy

I’m logging this cuz free time! Logpheus felt like going on a spamming spree because of a bug in my code. Every minute a check ran and my dumbass made it update db to the value of the check so every 2 minutes it would change value back to one that causes shipped message to post causing spam hopefully this should be fixed tho

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

WOOOOOOO just took down prod for 10 minutes because im dumb! I spent this time fixing my dumb mistakes, adding support to use full postgres in prod so I only need pglite in dev making my life easier in both cases and adding validation of api keys when added!

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

This whole devlog time was spent on another migration because I found out about pglite (postgres in wasm) and drizzle supported it so I migrated over to that instead because drizzle makes my life way more convienent especially working on logpheus it just took so long to setup as it was my first time using drizzle and i had to also create migration from sqlite and json to pglite to ensure no data loss.

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Migration!

Using json was really annoying especially for every project using their own cache json file for devlogs so instead i swapped to SQL which is using bun:sqlite for storing api keys, projects etc taking advantage of buns implementation which is pretty fast but also its less resource usage slightly because I’m not using json for everything I need parsing it stringifying it pushing it to file a lot. All previous json files will be migrated on start to the new db.

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Haiiiiiiiiiiii

I NEED MARKDOWN TO TEST LOGPHEUS THIS ISNT REALLY A DEVLOG JUST TESTING SOMETHING DEVLOG SOON THO

REA
DK
YOUR BALD

  • QUACK
  • A
  1. A
  2. a
  • quacked at people today
  • meowed at people today
    sniffs you
arf arf

quacker


sadgagagdag

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

UH MORE HOURS FOR ME YIPEEEEEE so basically i in this time explode prod a couple times because of the new dockerfile but fixed it added improved error handling so that it doesnt spam my logs when something like a 401 happens i added ability to change api key in a channel using /logpheus-config, i converted timestamps to utc and now use the good format not the us format for dates so DD/MM/YYYY and it is now clickable timestamp so users can click it and convert it to their timezone if they want to and i moved the ext header which is useless to axios.create instead of spammed in every func call

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Might aswell make a devlog for the stuff i did even though not really important. During this time I improved upon the add command to post more detail of the project when being added, I made changes to the Dockerfile to improve its build times using docker’s cache mounts and removing unnecessary stages (i stole the build file from buns website and its very over complicated for this) and I made pending review after ship message more clear and once reviewed message more clear.

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Shipped this project!

Hours: 3.51
Cookies: 🍪 69
Multiplier: 19.66 cookies/hr

From last ship i just improved upon the bot. It now has ship posts so it posts a msg when you ship a project and when it gets accepted i also cleaned up code to be more readable and easier to dev in and also with new api fields it uses less resources and hits api less hard and probably sum other stuff

Your Friendly Neighboured AVCAP Member Gayzzy

Clean up of code to be more easier to develop in by seperating views/commands out into seperate files, fixed cache files that was done before latest update using differnet cache setup not causing any issues but with this update would of so it now migrates old caches to new format and now includes ship status!!!!!!!

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

More improvements to the code! The bot message has improved to be more detailed with the devlog and also improved the code by setting types to the functions used so when called you can know what data is returned easily from typescript and your ide and also cleaned up some of the code.

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Okay bot now makes use of devlog_ids to check so less resources during hosting and should also mean less api hits :3c also now /logpheus-stats to see how many users it has and every req has header that makes bot show up on the extensions page

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

I need a devlog to test but the bot’s handling system of new devlogs is being changed to do less work by making us of the new devlog_id in /api/v1/projects/:id making the bot and probably the api do less work thats just assuming but atleast the bot will do less work so peak!!!

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Shipped this project!

Hours: 4.77
Cookies: 🍪 94
Multiplier: 19.66 cookies/hr

I built Logpheus a bot that you can add to your personal channel to get your flavortown devlogs posted to. It requires your own api key which can only be used once per channel but multiple projects can be added to a channel. If you don’t want to give me your api key to use it then it has a self host guide using docker in its readme. I didn’t learn much part from how to use the flavortown api.

Your Friendly Neighboured AVCAP Member Gayzzy

An extra 21 minutes for me because docker sucks! I literally spent 21 minutes just trying to get apiKeys to be persistant in the docker containuer using docker volumes i hate docker NOW ITS PRODTATO READY

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Prodtato. The bot is in prod and seems stable working in my channel! The docker is complete and also finished the readme showing how to use it but also how to self host it if you dont trust me with your api key which is BORING TRUST MEEEEEE its basically done i ship i think i did other stuff too but i forgor

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Woah fast fix too i swapped it to use api key instead sas the prefix only allowing 1 api key to be used for a channel but a channe4l can have multiple projects subscribed so yipeeeeeeeee

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

Woah this was a fast devlog i made /logpheus-remove so you can now remove your project from a channel! and i also realised im an idiot! i now gotta modify the code to not use project id as a prefix and instead use channel id so someone cant block you from adding your proj to your channel because they added it to theres!

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

The past hour I have been debugging and making the bot worked implementing /logpheus-add to add projects to the list and it works i just need to add /logpheus-remove now :3c and also docker support

Attachment
0
Your Friendly Neighboured AVCAP Member Gayzzy

I need a devlog to test so uhm past hour and half i well made lib file for ft its a class file so i can use it in other projects if i want to too then using that i made it pull projects then pull devlogs if no cache file exists it adds all devlogs of project id which is in apiKeys.json which stores project id as key then under it the api key and channel to post it to

Attachment
2

Comments

Matei sHomePage (No.1 PHP Lover)

wow gizzy good job!!

Pascal Lösch
Pascal Lösch 4 months ago

Its really great, well done!!!