A Reddit-inspired social media platform built in C
Groddit is a terminal based social media application that brings the essence of Reddit to your command line. Create posts, engage in discussions, vote on content, and connect with other users, all through an elegant text-based user interface.
Kelompok K01-I: CREDIT
- 13524001 Samuelson D Tanuraharja
- 13524019 Kevin Wirya Valerian
- 13524023 Jonathan Kris Wicaksono
- 13524026 Made Branenda Jordhy
- 13524053 Muhammad Haris Putra Sulastianto
Core Functionality:
- User Management: Register accounts, login/logout with secure password hashing
- Content Creation: Create posts in subgroddits (topic-based communities) and comment with nested replies
- Voting System: Upvote/downvote posts and comments with karma tracking
- Social Features: Follow/unfollow users, view followers and following lists
- Profile System: View user profiles with activity statistics and recent posts
Advanced Features:
- Smart Feed (Heap-based): Personalized feed from followed users with latest/newest sorting
- Trending Analysis: Discover hot topics in subgroddits with keyword frequency analysis
- Advanced Search (Trie-based): Fast prefix search for users, posts, and subgroddits
- Friend Recommendations (BFS Graph): Get friend suggestions based on mutual connections
- Content Moderation: Automatic filtering of inappropriate content using blacklist
- Data Security: Password hashing (FNV-1a) and file encryption (LCG cipher)
- Professional TUI: Beautiful terminal interface with ANSI colors, box-drawing characters, and animations
- GCC compiler (or any C compiler)
- Make build tool
- Unix-like environment (Linux, macOS, or Windows with WSL)
- Clone the repository:
git clone https://github.com/Labpro-22/if2110-tubes-2025-k01-i-1.git
cd if2110-tubes-2025-k01-i-1- Build the project:
make- Run the application:
./bin/mainTo start developing this project:
git clone https://github.com/Labpro-22/if2110-tubes-2025-k01-i-1.git
cd if2110-tubes-2025-k01-i-1if2110-tubes-2025-k01-i-1/
├── README.md
├── Makefile # Build configuration
├── bin/ # Compiled executables
│ └── main
├── build/ # Object files (.o)
├── src/ # Source files
│ ├── core/
│ │ ├── main.c # Entry point
│ │ └── main.h
│ ├── adt/ # Abstract Data Types
│ │ ├── ADTSederhana/ # Basic ADTs (User, Post, Comment, etc.)
│ │ ├── Graph/ # Graph for social network
│ │ ├── Heap/ # Max Heap for feed sorting
│ │ ├── ListBerkait/ # Linked list implementation
│ │ ├── MesinKarakter/ # Character machine
│ │ ├── MesinKata/ # Word machine for parsing
│ │ ├── PostTree/ # Tree for comment hierarchy
│ │ └── Trie/ # Trie for advanced search
│ └── utils/ # Feature modules
│ ├── AdvancedSearch/ # Trie-based search
│ ├── Comment/ # Comment management
│ ├── ContentModeration/ # Content filtering
│ ├── Feed/ # Personalized feed
│ ├── FollRec/ # Friend recommendations
│ ├── Initialize/ # System initialization
│ ├── Kreativitas/ # TUI components
│ ├── Load/ # Data loading
│ ├── Post/ # Post management
│ ├── Profil/ # User profiles
│ ├── Save/ # Data persistence
│ ├── Security/ # Hashing & encryption
│ ├── Social/ # Follow system
│ ├── Subgroddit/ # Community management
│ ├── Trending/ # Trending analysis
│ ├── User/ # Authentication
│ └── Voting/ # Vote management
├── config/ # Configuration & data files
│ ├── config-1/ # Sample data
│ ├── PwHashed/ # Hashed password data
│ ├── FileEnc/ # Encrypted file data
│ └── BlacklistWords/ # Moderation wordlist
└── doc/ # Documentation
The project uses a Makefile for compilation:
# Build the project
make
# Clean build artifacts
make clean
# Rebuild from scratch
make clean && makeAll object files are placed in build/ and the final executable in bin/main.
After launching the application, you'll see a welcome screen. Here are the main commands:
REGISTER; # Create a new account
LOGIN; # Sign in to your account
LOGOUT; # Sign out
POST; # Create a new post
COMMENT; # Add a comment to a post
DELETE_POST; # Delete your post
DELETE_COMMENT; # Delete your comment
CREATE_SUBGRODDIT; # Create a new community
SHOW_FEED; # View your personalized feed
VIEW_SUBGRODDIT <name> <HOT|NEW> <INCR|DECR>; # Browse subgroddit posts
LIHAT <post_id>; # View post with comments
SEARCH_USER; # Search for users
SEARCH_POST; # Search for posts
SEARCH_SUBGRODDIT; # Search for communities
TRENDING <subgroddit> <time> <unit>; # View trending topics
FOLLOW <username>; # Follow a user
UNFOLLOW <username>; # Unfollow a user
FOLLOWING; # View who you follow
FOLLOWERS; # View your followers
FRIEND_REC; # Get friend recommendations
PROFILE <username>; # View user profile
UPVOTE_POST; # Upvote a post
DOWNVOTE_POST; # Downvote a post
UNDO_VOTE_POST; # Remove your vote from post
UPVOTE_COMMENT; # Upvote a comment
DOWNVOTE_COMMENT; # Downvote a comment
UNDO_VOTE_COMMENT; # Remove your vote from comment
LOAD; # Load data from folder
SAVE; # Save current state
SET_SECURITY; # Configure security settings
HELP; # Show all available commands
EXIT; or QUIT; # Exit the application
Enable password hashing (irreversible):
SET_SECURITY PASSWORD;
Enable file encryption:
SET_SECURITY FILE ON;
Set custom encryption seed:
SET_SECURITY ENC_SEED <any positive number>;
Disable file encryption:
SET_SECURITY FILE OFF;
Data is stored in CSV format under config/ folders:
user.csv: User accountspost.csv: Posts with contentcomment.csv: Comments and repliessubgroddit.csv: Communitiessocial.csv: Follow relationshipsvoting.csv: Vote recordssecurity.conf: Security configurationblacklisted_words.json: Blacklisted words for POST and COMMENT
Contributions are welcome! This project is part of IF2110 Algorithm and Programming II course at Institut Teknologi Bandung.
If you'd like to contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feat/test) - Commit your changes (
git commit -m 'Feat: add some feature') - Push to the branch (
git push origin feat/test) - Open a Pull Request
Please ensure your code follows the existing style and includes appropriate documentation.
- Course: IF2110 Algorithm and Programming II
- Institution: Institut Teknologi Bandung
- Repository: https://github.com/Labpro-22/if2110-tubes-2025-k01-i-1
- Documentation: See
doc/folder for detailed specifications
This project is developed as part of academic coursework at Institut Teknologi Bandung. All rights reserved to the course instructors and student contributors.