Could Someone Give me Advice on Structuring a Complex Django Project with User-Generated Content?


#1

Hello there,

I am working on a Django project that revolves around user-generated content; and I am a bit stuck on the best way to structure it. The core idea is to build a platform where users can create; edit; and share content; similar to a blog but with more flexibility in the types of content they can create posts; image galleries; and embedded multimedia.

Should I create separate models for each type of content and then use a common Content abstract base class? Or is it better to use a more generic approach with a single model and store different content types as JSON or similar?

I am also unsure about how to best implement features like likes; comments; and shares. Should these be generic models linked to content via a GenericForeignKey; or is there a more Django friendly approach that I am overlooking?

I am concerned about how well the project will scale. As the number of users and content grows, what should I be aware of in terms of database optimization; caching strategies; and overall performance?

Also, I have gone through this post; https://discuss.hellowebapp.com/t/steps-to-start-app-and-start-hello-world-displays-plain-file-minitab/ which definitely helped me out a lot.

I am open to refactoring and restructuring if necessary; so feel free to suggest anything you think might be helpful.

Thanks in advance for your help and assistance.