Skip to content

Commit 50cd3c8

Browse files
authored
Update README.md
1 parent ffbefde commit 50cd3c8

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,39 @@ app
2121
microservices
2222
helpers
2323
validations
24+
config
25+
databases
2426
main.go
2527
2628
```
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
2732

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.
2957

3058
#REST Routes
3159
##Register User

0 commit comments

Comments
 (0)