You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-1Lines changed: 29 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,39 @@ app
21
21
microservices
22
22
helpers
23
23
validations
24
+
config
25
+
databases
24
26
main.go
25
27
26
28
```
29
+
##api
30
+
api package contains all the REST API routes where validations will be done in validations package with same file name and same function names as in api package. This validations will be done through MIDDLEWARE concept.
31
+
It is simple to take the request,validate,pass params to controllers
27
32
28
-
33
+
##controllers
34
+
api routes will call the controllers where file name and function names are same as api package.
35
+
This is the main center where function logic will be done. like calling to microservices ,for loops ,connecting third parties etc.
36
+
37
+
##models
38
+
models are simply table models and functions to query and fetch from database. This layer is simply connected to database and do all functions. It does not have any controller logics. It is simply for take query params from controllers and query database and return response.
39
+
40
+
##microservices
41
+
microservices are for third party services like amazon,sockets,mailchimp, some background cron jobs etc.
42
+
43
+
##helpers
44
+
helpers are simply utility functions for environment variables, password encryptions,jwt token
45
+
46
+
##validations
47
+
All route validations will be done here as a middleware to routes. so the routes will be CLEAN and SIMPLE.
48
+
49
+
##config
50
+
config folder will contain keys.jso, push notification certificates file etc.
51
+
52
+
##databases
53
+
databases will have connection to databases. Can also write functionalitites like indexing etc when server starts.
54
+
55
+
##main.go
56
+
main.go is the main file where everything will be connected and starts running server.
0 commit comments