| Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
2.0 [2025/10/29 11:22] 20.171.207.2 old revision restored (2025/10/29 10:59) |
2.0 [2025/10/29 13:32] (current) 20.171.207.2 old revision restored (2025/10/29 11:22) |
| ==== App Structure Overview ==== | ==== App Structure Overview ==== |
| |
| Both the frontend and backend are programmed in Typescript which is executed by the [[https://www.npmjs.com/package/ts-node |ts-node]] package; Typescript is a type safe, and more structured superset of the javascript lanugage (ES6/ES12-ES2021). We use [[https://classic.yarnpkg.com/lang/en/docs/ |Yarn]] on the frontend and backend also, to install packages (like ts-node) and run a local development server. | Both the frontend and backend are programmed in [[https://www.typescriptlang.org/docs/handbook/intro.html |Typescript]] which is executed by the [[https://www.npmjs.com/package/ts-node |ts-node]] package; Typescript is a type safe, and more structured superset of the [[https://www.freecodecamp.org/news/the-complete-javascript-handbook-f26b2c71719c/ |Javascript]] lanugage (ES6/ES12-ES2021). We use [[https://classic.yarnpkg.com/lang/en/docs/ |Yarn]] on the frontend and backend also, to install packages (like ts-node) and run a local development server. |
| |
| |
| A GraphQL server is used in the backend, to provide structured and secure access to the data in our Database. We've not currently chosen a server to serve the backend code to the client, therefore, the project only works locally from development enviroments. | A GraphQL server is used in the backend, to provide structured and secure interface to interact with the database. TypeORM is the database adapter which connects to the database allowing us to manipulated the tables and data within it; graphql uses the TypeORM adapter in order to access the data. We've not currently chosen a server to serve the backend code to the client, therefore, the project only works locally from development enviroments. |
| |
| Our database is implemented in Postgres, which is a relational database that uses SQL. | Our database is implemented in Postgres, which is a relational database that uses SQL. |
| * 'NODE_ENV=development' is a cross-env option to set the enviroment to development | * 'NODE_ENV=development' is a cross-env option to set the enviroment to development |
| * 'ts-node-dev' is our typescript execution engine as we want our typescript files to be executed with a typescript engine | * 'ts-node-dev' is our typescript execution engine as we want our typescript files to be executed with a typescript engine |
| * '- - files' is a ts-node option, to tell ts-node to load files specified in the `tsconfig.json` file. We do this as the `blipp` package doesn't import correctly unless this happens, as ts-node can't see the blipp file in `backend/type/blipp.d.ts` | * '- -files' is a ts-node option, to tell ts-node to load files specified in the `tsconfig.json` file. We do this as the `blipp` package doesn't import correctly unless this happens, as ts-node can't see the blipp file in `backend/type/blipp.d.ts` |
| * '- - ' is used to stop options being passed to ts-node | * '- -' is used to stop options being passed to ts-node (i.e. we passed ts-node '- -files', we don't want to pass anything else) |
| | * './src/index.ts' is the first file we are running as it's the root |
| |
| |