The End
Okay, so before I put up the devlog, let me just say why I had to ship a second time. I shipped my project, but then I was asked to redo some parts out of worry of “vibe coding”—which honestly, I don’t vibe code really, because I genuinely can’t (damn potato PC). But yes, I did use AI help, and maybe it was over the top. To atone, I re-went through every file and did these changes:
- Backend Storage: I changed the backend file storage to the Hack Club CDN API.
-
Database Restructuring: I split the large
db.tsfile into individual function files, each serving its respective function (likepaper.tsdeals with the SQL queries related to the paper table). Now, I used AI to write the SQL queries here because I honestly don’t know how to. I learned a lot, but I still needed its help. - CSS & Styling Refactor: I went through the CSS files and updated every single one of them. The theme and styling are still the same(ish)—I did minor changes here and there about the styling, but the most important parts are:
- Tokenization: I tokenized everything. I went through each file and checked the sizes, basing it on the Tailwind system where it’s almost all multiples of 4.
-
Scoped Styles: I made sure every
page.tsxfile had its ownstyle.csswhich only it calls, so that I won’t pollute styles—which turns out was the reason that, for some reason, when I updated the styles inpin’s CSS, thearchiveCSS changed. - Admin Unification: I also used the styles from the public front on the admin front earlier a lot of admin was AI generted so it was pretty bad but I’m proud to say that is no longer the case
-
Utilities: I made a small
utildirectory which has repeated functions that I found. - Scoring System: I made a scoring system which was so cool—I felt like Einstein in that 10 minutes! But it’s basically the same one they use on Reddit (my inspiration for the system). It’s based on something called the Wilson Score. I didn’t really understand the math, but it works, so it works (I understood what it did, but not how it did it). I added a bit more to it, though: one is an engagement rating similar to the gladiator algorithm in TikTok, which basically gives more points for being more popular and having downloads, and then a recency bonus for the first 30 days to keep new papers afloat. This really changes nothing in the system, but I felt cool and it’s my devlog, so hear about it!
- Prettier Config: Oh, I forgot—I added a Prettier config so that it didn’t prettify the PDF.js JavaScript file.
- README Update: One of my friends told me the README was balls and it was not telling anything, so I rewrote parts of that too. I used Obsidian, so I got nice tables and shit.
- Custom 404 Page: I added a 404 page, and I did a nice styling where instead of the zero, it’s a file-missing icon.
- Code Splitting: I also worked to split some files, but some pages were pure hell and I left them there, so sorry about that.
- Short-links:” While refactoring I also added this one small feature to the share link button in paper page, it basically proxies to /p/:id instead of /paper/:id not a lot but its nice
- Metadata & Icons: And peakest of all, I added the icon to every page and the metadata thingy I saw on the Next.js website.
- Vercel Switch: I also thought since I’m not storing the files on the server anymore why not go ahead and use Vercel itself to host instead of nest so i will be hosting on Vercel
P.S this has tired me out way to much and i hope you enjoy it, the photo is admin dashboard in new true black
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.