RedditClone
A simple P0 Reddit clone implemented with Ktor Server side client, JWT Auth, Exposed ORM and My SQL
Database Schema design
Prerequisite
- Kotlin
- MySQL DB
- Gradle
Frameworks used
Features
- JWT Auth ✅
- Upvote/Downvote ✅
- Pagination ✅
- Nested Comments ✅
- Profile pictures/ images in posts 🚧
How to setup the project
- In Application conf file setup username and password for the Database.
- Create database in the MySQL with the name redditClone.
Why Exposed over other ORMs?
- Good control over creating auto-incremented tables
- Simple basic functions with well-supported conditional expressions
- Intuitive way to interact between tables using joins
- Easy to combine multiple requirements over a single (SQL query Sample from the project)
API reference
- Auth Routes
- Login
- Register
- Get Current User
- User Routes
- Get Profile
- Search User
- Follow User
- Un-Follow User
- Get User Following Data
- Subreddit Routes
- Create Subreddit
- Get Subreddit by Name
- Search Subreddit
- Follow Subreddit
- Un-Follow Subreddit
- Get Subreddits Followed by User
- Post Routes
- Create Post
- Get Post by Id
- Get PostFeed
- Get Post by Subreddit Name
- Get Post Created by User
- Search Post by Heading
- Upvote Post
- Downvote Post
- Comment Routes
- Create Comment
- Get Comment by Id
- Get Comment by Post
- Get Comment by User
- Upvote Comment
- Downvote Comment
💬 Want to discuss?
Have any questions, doubts or want to present your opinions, views? You're always welcome.
Find this project useful ?
Support it by clicking the ⭐️ button on the upper right of this page.
License
MIT License
Copyright (c) 2023 Adithya Kamath
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.