-
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
models
directory. - All constants that are used across the app are inside
constants
directory. - For the response JSON generation, Forli uses
Active Model Serializer
. Theserializers
directory contains all model serializers. - For background jobs, Forli depends on
Active Job
. Thejobs
directory 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 forAlgorithmia
service and the sentiment analyzer util code that are used across app. -
SpamFilter
- Contains client code forAkismet
and the spam filter util code that are used across app. -
tasks
- Contains rake tasks required for the app.