CLI-SocialNet banner

CLI-SocialNet

24 devlogs
85h 48m 20s

A terminal-based social networking platform written in Python. Connect, share, and interact with users through a command-line interface.

This project uses AI

[from README.md]
This project was developed with selective use of AI assistance. Most of the implementation was done independently, with AI mainly used for:

MongoDB Implementation (database_m.py)

  • AI was used extensively to help implement the MongoDB backend to speed up the implementation process
  • Primary focus was on fixing compatibility issues and bugs.
  • Significant use of tab autocomplete (code suggestions)

UI and Layout (utils.py)

  • AI assistance was used to help with text wrapping, Unicode alignment and helped debug border rendering in the display UI system

Bug Fixing and Debugging

  • AI was consulted when facing difficult bugs, particularly in:
    • Comment system implementation
    • Database issues
    • Alignment and formatting problems
    • Other bugs

Documentation

  • README was partially generated by AI and then modified to ensure accuracy.

Used ChatGPT, Gemini and Github Copilot (mainly for inline suggestions)

Demo Repository

Loading README...

artur33

Shipped this project!

Hours: 85.81
Cookies: đŸȘ 2445
Multiplier: 28.5 cookies/hr

After a month of working on it, I’m shipping CLI-SocialNet
It’s a “full” social network platform (similiar to Twitter (X)) that runs in a terminal.
Started as a way to learn SQL databases and ended up doing a lot of features and commands: posts, comments, likes, follows, DMs, polls, hashtags, an XP system and even ASCII art in posts (conversion).
The hardest part was probably the fact that I was getting lost in my own codebase as it grew, I had a lot of files and implementing new functionality became a bit complex. The MongoDB part was also challenging (I used the most AI in there (MongoDB) to speed things up after already learning what I wanted from SQL).
I’m proud of the result, of course, it actually feels like a real social network. Maybe it’s not the most original thing to make, but I’ve done it on my own. The project taught me how to build “big” projects (since I think this is my biggest project?) and try not to get lost in the codebase lol

artur33

Last devlog for this project, it was a good one, I think I’ve learnt a lot about SQL databases (Which was the main goal for me) and yeah, it was a big project (at least for me, hehe), I’m very happy and proud ^^

Added/Fixed:

  • Refactored configuration handling with a dedicated loader module (and updated all config references in other files) (config_loader.py)
  • Improved ‘help’ command output for better command viewing
  • Adjusted post rendering alignment
  • Wrote the README (with AI help)
  • Created the executable (with Pyinstaller ‘socialnet.spec’)
  • Added ‘requirements.txt’ and ‘config.json’
  • Removed ‘config.py’
  • Minor internal refactors and cleanup

Next:

  • SHIPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
Attachment
0
artur33

Added/Fixed:

  • Reporting system for posts, comments, and users
  • User command to submit reports: ‘report’
  • Admin commands to review, resolve, or dismiss reports: ‘admin reports’, ‘admin resolve’ and ‘admin dismiss’
  • Minor internal refactors related to moderation

Next:

  • Fix problems/bugs
  • Make an executable (or smth like that)
  • Shipppppppppppppppppppppppppp
0
artur33

Added/Fixed:

  • XP system with tracking for user interactions (posting, liking, commenting, reposting and following)
  • Achievements system and rewards for them
  • Leaderboard to rank users
  • Terminal width customization (in settings) for more flexible UI
  • New commands: ‘xp’, ‘achievements’ and ‘leaderboard’
  • Minor internal refactors and fixes related to visibility (users can always view their own content even if private -> this was a bug in the sqlite database)

Next:

  • Fix problems/bugs
  • Make an executable (or smth like that)
  • Shipppppppppppppppppp
0
artur33

Added/Fixed:

  • User settings system with customizable preferences
  • Appearance settings: banner color and prompt color
  • Display settings: posts per page
  • Notification preferences settings
  • New commands: ‘settings’ and ‘setting’
  • Minor internal refactors and fixes related to settings (like the login and logout commands and all the banner/prompt colors) and notifications

Next:

  • Add levels and xp system (more interactions more profile level)
  • Fix problems/bugs
  • Make an executable (or smth like that)
  • Shipppppppppppp
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0
artur33

Added/Fixed:

  • Poll support for posts: users can create polls, vote, and view results/own polls
  • Both database (Sql and Mongo) schema updates to support polls
  • Post display enhancements to correctly render poll options (‘utils.py’)
  • Changed the ‘whoami’ command (a bit)
  • New commands: ‘postpoll’, ‘votepoll’ and ‘mypolls’

Next:

  • Add some small settings features
  • Maybe add levels and xp system (more interactions more profile level)
  • Fix problems/bugs
  • Make an executable (or smth like that)
  • Shippppp
Attachment
0
artur33

Added/Fixed:

  • Completed the MongoDB database backend file
  • Resolved all compatibility issues between MongoDB and the existing codebase by aligning MongoDB behavior with existing commands and “feature expectations”

Note: This devlog marks the end of the MongoDB work. I did use AI during this, mainly to fix bugs and problems, and yes
 a lot of tab autocomplete
No new features were added here: the focus was entirely on making MongoDB fully compatible with the rest of the project without breaking everything, yeah

Next:

  • Add polls in posts
  • Possibly add some small settings features
  • Maybe add levels and xp system (more interactions more profile level)
  • Fix problems/bugs
  • Make an executable (or smth like that)
  • After that, probably, the project will be ready for shipping
0
artur33

Added/Fixed:

  • Addad a switch for database backend (sqlite3 - MongoDB)
  • Expanded (and still working on) MongoDB logic [for now: users, posts, sessions, likes]
  • Standardized post ID handling (just by making it an int everywhere) across ‘main.py’ commands.

Note: This devlog is mostly to document progress. I’m still working on the MongoDB backend and not really adding new features
 just copying the sql database logic and making sure things don’t explode.

Next:

  • Continue working on the MongoDB backend
  • Make things work :p
Attachment
0
artur33

Added/Fixed:

  • Private account (no visibility of content)
  • Access control updated to allow content viewing of private users only if mutual followers (can_view_content func)
  • Registration rate-limit per device (hash composed by hostname-MACadress-system) to reduce spam registers
  • Large ASCII ‘big text’ posts support + preview command
  • Improved login failure handling: account lock after 5 wrong password attempts.
  • Started working (a little little bit) on the MongoDB database
  • New commands: ‘postbig’ and ‘bigtext’
  • Internal refactors and bug fixes related to privacy, authentification and posts

Note: This was probably the most complicated devlog to make so far. A lot of different files and functions, I’m starting to get lost in my own codebase, and honestly
 I’m tireddd, ahhh


Next:

  • Continue/Complete the MongoDB database layer file ‘database_m.py’ (Likely use some AI help for this, since the main goal was learning about SQL-like databases. Also because I alredy did some MongoDB projects so this is just to speed up things, but I will try to do my best)
0
artur33

Added/Fixed:

  • Command alias system for user shortcuts (of commands)
  • Post search functionality to find content by query
  • User search functionality to find other users
  • Mention system with automatic detection during post creation
  • New commands: ‘search’, ‘usersearch’, ‘mentions’, ‘alias’ and ‘unalias’
  • Minor internal refactors and fixes

Note: I NEED TO START WORKING AT MONGO DATABASEEE

Next:

  • Fix and do the TODO’s (private profiles and user creation)
  • Large ASCII text might be cool, but uhhh, aaaaaaa
  • Once again
 maybe start working on a MongoDB database aaaaaaaaaaaaaaaa
Attachment
Attachment
Attachment
Attachment
0
artur33

Added/Fixed:

  • Hashtag system with automatic detection during post creation
  • Trending hashtags
  • Hashtag search functionality
  • Help message (for non-logged users)
  • Changed banner (lol)
  • New commands: ‘hashtag’, ‘htrending’ and ‘hsearch’

Note: This devlog was written a bit in a rush again after spending most of the time implementing the hashtag system and fixing edge cases
 sowwy

Next:

  • Add finally a command for creating aliases of existing commands
  • User mentions
  • Possibly start working on a MongoDB database option (if nothing comes to my mind)
Attachment
Attachment
0
artur33

Added/Fixed:

  • Repost system for reposts and quote reposts
  • Bookmarking system for saving posts
  • Post pinning on user profiles (Profile displays pinned posts)
  • Conversation closing command for direct messages
  • Notification clearing command
  • New commands: ‘repost’, ‘unrepost’, ‘quote’, ‘reposts’, ‘pin’, ‘unpin’, ‘pinned’, ‘bookmark’, ‘unbookmark’, ‘bookmarks’, ‘closedm’ and ‘clearn’
  • Minor internal refactors and fixes (+ feed and post metadata updated to include repost info)

Note: hashtag functionality will he added in next devlog because I already spent a lof of time doing all of this and I need to make a devlog aaaaaaaa


Next:

  • Try to implement the hashtag system for post discovery
  • Consider adding command aliases command
  • Possibly start working on a MongoDB database option
0
artur33

Added/Fixed:

  • Notification system for user interactions: likes, comments, follows, and direct messages
  • Unread notification and unread message counts displayed directly in the prompt
  • DM: ‘messages’ and ‘inbox’ UI change
  • Admin “panel” UI change
  • New command: ‘notifications’
  • Minor internal refactors and database schema updates related to notifications and messaging and UI (utils)

Next:

  • Add a repost system
  • Add pinnable posts on user profiles
  • Add post bookmarking /saving
  • Maybe a hashtag system for post discovery (idk how
 lol)
Attachment
0
artur33

Added/Fixed:

  • Improved post, comment, and profile display with bordered UI and new structure (text wrapping and Unicode alignment for correct rendering)
  • Comment counts added to posts
  • Profiles now display recent posts

Note: A lot of time was spent making the UI work properly and display everything correctly. I initially tried to make all the layout and formatting logic on my own, but ended up using AI to help reason through alignment, borders, and edge problems/bugs.

The notification system was not implemented in this commit, as development was focused on UI :/

Next:

  • Finish UI changes: for admin views and direct messages
  • Add the notification system
1

Comments

janekmusin
janekmusin about 2 months ago

Looks great, I’m looking forward to release

artur33

Added/Fixed:

  • Private account support -> users can toggle private status
  • Direct messaging system (“user-to-user” private communication): Inbox and message viewing logic for direct messages
  • Comment display on single posts (comment count and comments)
  • Minor internal refactors and fixes
  • New commands: ‘dm’, ‘messages’, ‘inbox’ and ‘private’

Note:
UI improvements were not made again
 I didn’t really have the time to think about it, so this part is still postponed for the next devlog (or at least hope so)

Next:

  • In the next devlog, focus will (finally) be on a proper UI redesign and cleanup
  • Possibly add a notification system
Attachment
0
artur33

Added/Fixed:

  • Post comments support: add, view, and delete comments
  • Admin log system to track moderation actions
  • User verification (just the verified -> doesn’t change anything, for now) system and admin privilege management (an user can become an admin now)
  • Minor internal refactors and bug fixes related to comments and moderation logic
  • New commands: ‘admin makeadmin’, ‘admin removeadmin’, ‘admin verify’, ‘admin unverify’, ‘admin logs’, ‘comment’, ‘delcomment’, ‘comments’

Note:

UI improvements were not made. Development was slowed due to some “implementation challenges” for the comment system, especially regarding comment IDs (I’m still not that good at databases
)

Next:

  • Enhance “comment” commands (current implementations is very basic)
  • Finally the UI cleanup and visual improvements (maybe)
  • Adding direct messages between users
Attachment
0
artur33

Added/Fixed:

  • ‘ascii.py’ for image-to-ASCII conversion [I’ve spent a bit of time to undestand how to make it work
]
  • Image support for posts with automatic ASCII art conversion and display
  • Avatar management system with ASCII profile pictures
  • Different feeds (personal and global): Personal feed (showing posts from followed users) and Global feed (explore feed for “new” content)
  • Refactored admin command structure in ‘main.py’ (now through subcommands)
  • Rate-limit for posting posts
  • Minor internal refactors and bug fixes related to posts, profiles, and feeds
  • New commands: ‘feed’, ‘explore’, ‘postimg’, ‘posturl’, ‘avatar’, ‘avatarurl’, ‘removeavatar’

Next:

  • Add comments support for posts
  • Do an admin log/audit system
  • Allow users to become admins
  • Some kind of user verification features
  • General UI cleanup and improvements [it really doesn’t look great right now
]
Attachment
0
artur33

Added/Fixed:

  • ‘admin.py’ and ‘config.py’ (currently only used for default admin password)
  • Default Admin user creation
  • Admin management system and functionality: ban/unban users, delete posts, and basic admin dashboard
  • “User” table changes (to manage account banning, ecc.)
  • Improved session validation and user feedback on moderation actions
  • Profile command with full profile display functionality
  • Following/Followers lists support to view who a user is following/who follows the user
  • New commands: ‘profile’, ‘following’, ‘ban’, ‘unban’ and ‘admin_delete’
  • Modified command: followers -> modified logic (similar to ‘foolowing’ command)
  • Minor bugs fixed

Next:

  • Image posting with automatic transformation into ASCII art
  • ASCII profile pictures (same logic as the previus lol)
  • Improve the current home feed and split it into a ‘Home’ and an ‘Explore’ feed, I think
0
artur33

Note: Profile-related commands and features are not fully completed yet. Work on them was temporarily paused to write this devlog, since it’s been a long time since the last one.

Added:

  • Created social.py (for social related functions)
  • Profiles with all the information about the user: id, username, display_name, bio, status, location, website, created_at, followers_count, following_count and posts_count
  • Follow system: unfollow users and track followers (followers listing and count)
  • Refactored posts display logic to improve clarity
  • Moved ‘displayname’ func in social.py
  • Profile editing commands: bio, status, location, and website
  • Social commands: unfollow, followers
  • Fixed database calls for supporting the new behaviour

Next:

Finalize profile commands, adding admin user (and commands) and enhance user feed/home

0
artur33

Initially, I wanted to store likes directly in the ‘posts’ table, but while working, I realized it would be cleaner to separate tables

Added:

  • Like system and tracking (+ related database changes): ‘like’, ‘unlike’ and ‘likes’ commands
  • ‘Follow’ command (needs to be finished by adding the unfollow and user profiles)
    And yeah, I need to finish the ‘follow system’ and make profiles
Attachment
0
artur33

Added:

  • Post management features (posts.py): create, delete, view posts and user feed;
  • ‘post’, ‘viewpost’, ‘deletepost’ and ‘myposts’ commands (and ‘home’ function modified);
  • ‘displayname’ command and functionality;
  • ‘validate_session’ function and integration;
  • ‘show_status’ function for ‘whoami’command.
    Fixed database table creation bug (caused by the timestamp).
    Will work now on the like and follow system

Attachment
0
artur33
  • Improved feedback messages by adding custom prints functions;
  • Modified authentication system by adding session management (not fully complete);
  • Added banner and a raw ‘home’ command.
    Now I will FINALLY start working on posts and on the homepage ^^
Attachment
0
artur33

Refactored authentication and added “utils.py”.
Added: ‘changepassword’ command.
Improved feedback messages (because I want to make different types of print functions for errors, warnings, info, ecc.) -> I will work on this now.
I want to finally start working on the homepage and the postsss

Attachment
0
artur33

I modified the user authentication system:
User registration and login with validation and all the authentication system is now on a separated file “auth.py
Added:

  • Logout functionality
  • Account deletion
  • Whoami command
  • Enhanced command parsing in “main.py”
  • Close database connection on exit (hehe, I forgot to do it previously)
Attachment
0
artur33

Added first implementation of user registration and login functionality, everything works trough a SQLite3 database (I’m new at working with SQL-based databases)

Attachment
0