In brief this project leverage Django and Django rest framework to mimic tweeter.So a user can browse our users profiles and their tweets , comment ,like or dislike their tweets if wanted. The core project is built using django rest framework ModelViewset and the nested routing is ensured by drf-nested-routers framework which I have found more interesting to use because if its conciseness. Main routes:
-
/api/profiles/ or /api/profiles/ ; Accepted Methods=["POST","HEAD","PATCH","DELETE","GET","PUT"] and Content_Type : Application/json ;
-
/api/tweets/ or /api/tweets/<tweet_pk> ; Accepted Methods=["POST","HEAD","PATCH","DELETE","GET","PUT"] and Content_Type : Application/json ;
-
/api/comments/ or /api/cooments/<comment_pk> ; Accepted Methods=["POST","HEAD","PATCH","DELETE","GET","PUT"] and Content_Type : Application/json ;
-
/api/profiles//tweets/<tweet_pk> ; Accepted Methods=["HEAD","GET"] and Content_Type : Application/json ;
-
/api/tweets/<tweet_pk>/tweets/<comment_pk> ; Accepted Methods=["HEAD","GET"] and Content_Type : Application/json ;
-
/api/tweet_likes/ or /api/tweet_likes/<tweet_like_pk> ; Accepted Methods=["POST","HEAD","PATCH","DELETE","GET","PUT"] and Content_Type : Application/json ;
-
/api/comment_likes/ or /api/comment_likes/<tweet_like_pk> ; Accepted Methods=["POST","HEAD","PATCH","DELETE","GET","PUT"] and Content_Type : Application/json ;
-
/api/tweets/tweet_likes/ or /api/tweets/tweet_likes/<tweet_like_pk> ; Accepted Methods=["HEAD","GET"] and Content_Type : Application/json ;
-
/api/comments/comment_likes/ or /api/comments/comment_likes/<comment_like_pk> ; Accepted Methods=["HEAD","GET"] and Content_Type : Application/json ;
NB: As every project needs improvement .This project could enhance using a python grapghQL server to resolve complexe relationship between different entities or models for complexes routhing .GraphQL technology is the cutting edge of web server technology and it's the best solution for implementing a complexe routing web technology in my humble opinion.