dhiway / cord-agent-app-v1

Agent (REST API endpoint) for cord.js sdk
Apache License 2.0
9 stars 7 forks source link

directory structure #16

Closed ishivanshgoel closed 1 year ago

ishivanshgoel commented 2 years ago

Should we change the folder structure for the project as follows?

| cord-agent-app-v1/src
|  | - cord
|  |  | - schema_cord.js
|  |  | - space_cord.js
|  |  | - record_cord.js
|  |  | - init_cord.js
|  | - entities
|  |  | - schema_entity.js
|  |  | - space_entity.js
|  |  | - record_entity.js
|  | - controller
|  |  | - schema_controller..js
|  |  | - space_cord.js
|  |  | - record_cord.js
|  | - config
|  |  | - dbconfig..js
|  | - index.js
|  | - server.js
amarts commented 2 years ago

Good suggestion... Minor change to what you suggested would make it better IMO. Mainly as directory name is indicative of what it is.

| cord-agent-app-v1/src
|  | - cord
|  |  | - schema.js
|  |  | - space.js
|  |  | - record.js
|  |  | - init.js
|  | - entities
|  |  | - Schema.ts  # this is better as its treated as 'Class' name in Typeorm
|  |  | - Space.ts
|  |  | - Record.ts
|  | - controller
|  |  | - schema.ts
|  |  | - space.ts
|  |  | - record.ts
|  | - config
|  |  | - dbconfig..js
|  | - index.js
|  | - server.js
ishivanshgoel commented 2 years ago

Working on it, and created a draft PR. I Would like to know your thoughts.