-
Notifications
You must be signed in to change notification settings - Fork 1
Code Architecture
K Sashi Kumar edited this page Jul 25, 2017
·
2 revisions
The backend Rails app follows Fat Model Skinny Controller design pattern. The code is organized in MVC hierarchical way.
- All database model class are inside
modelsdirectory. - All constants that are used across the app are inside
constantsdirectory. - For the response JSON generation, Forli uses
Active Model Serializer. Theserializersdirectory contains all model serializers. - For background jobs, Forli depends on
Active Job. Thejobsdirectory holds the code for jobs.
The lib directory holds the classes and modules for the core business logic. For now, the modules that are implemented are:
-
MetaInfo- Handles Voting and View count -
Notification- Handles Notifications -
Redis- Contains keys and wrapper code to interact with Redis -
Reports- Contains code to update/get Reports data. For now, the data is persisted in Redis. -
Search- Contains code for indexing data to Elasticsearch. -
Sentiment- Contains client code forAlgorithmiaservice and the sentiment analyzer util code that are used across app. -
SpamFilter- Contains client code forAkismetand the spam filter util code that are used across app. -
tasks- Contains rake tasks required for the app.