Skip to content

Commit

Permalink
feat(food): migrate to new AI based Reimanns API (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 authored Dec 18, 2024
1 parent d5f1eaf commit 5eb4304
Show file tree
Hide file tree
Showing 17 changed files with 2,867 additions and 149 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ http://localhost:4000/

#### Project Structure

- `index.ts` - The entry point for the API.
- `src/` - Contains the source code for the GraphQL API.
- `src/schema.gql` - Contains the GraphQL schema.
- `src/data/` - Contains the static data.
- `src/resolvers/` - Contains the resolvers.
- `src/types/` - Contains the types for TypeScript.
- `src/scrapers/` - Contains the scrapers for the data used by the resolvers.
- `src/utils/` - Contains utility functions.
- `index.ts` - The entry point for the API.
- `src/` - Contains the source code for the GraphQL API.
- `src/schema.gql` - Contains the GraphQL schema.
- `src/data/` - Contains the static data.
- `src/resolvers/` - Contains the resolvers.
- `src/types/` - Contains the types for TypeScript.
- `src/scrapers/` - Contains the scrapers for the data used by the resolvers.
- `src/utils/` - Contains utility functions.

#### Commiting Changes

Expand Down
2,376 changes: 2,376 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Binary file removed bun.lockb
Binary file not shown.
29 changes: 29 additions & 0 deletions codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { CodegenConfig } from '@graphql-codegen/cli'

const config: CodegenConfig = {
overwrite: true,
schema: 'https://reimanns-api.neuland.app/graphql',
documents: ['src/**/*.ts'],
ignoreNoDocuments: true,
generates: {
'src/__generated__/': {
preset: 'client',
config: {
documentMode: 'string',
},
},
'src/__generated__/schema.graphql': {
plugins: ['schema-ast'],
config: {
includeDirectives: true,
},
},
},
config: {
scalars: {
Date: 'string',
},
},
}

export default config
12 changes: 6 additions & 6 deletions docs/magidoc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ export default {
:::tabs
---Production
- **Docs**: [https://api.neuland.app/](https://api.neuland.app/)
- **Endpoint**: [https://api.neuland.app/graphql](https://api.neuland.app/graphql)
- **GitHub**: [Main Branch](https://github.com/neuland-ingolstadt/neuland.app-backend/tree/main)
- **Docs**: [https://api.neuland.app/](https://api.neuland.app/)
- **Endpoint**: [https://api.neuland.app/graphql](https://api.neuland.app/graphql)
- **GitHub**: [Main Branch](https://github.com/neuland-ingolstadt/neuland.app-backend/tree/main)
---Development
- **Docs**: [https://api.dev.neuland.app/](https://api.dev.neuland.app/)
- **Endpoint**: [https://api.dev.neuland.app/graphql](https://api.dev.neuland.app/graphql)
- **GitHub**: [Dev Branch](https://github.com/neuland-ingolstadt/neuland.app-backend/tree/develop)
- **Docs**: [https://api.dev.neuland.app/](https://api.dev.neuland.app/)
- **Endpoint**: [https://api.dev.neuland.app/graphql](https://api.dev.neuland.app/graphql)
- **GitHub**: [Dev Branch](https://github.com/neuland-ingolstadt/neuland.app-backend/tree/develop)
:::
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default [
'**/dist',
'**/build',
'**/.svelte-kit',
'**/generated',
],
},
{ files: ['**/*.{js,mjs,cjs,ts}'] },
Expand Down
40 changes: 22 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@
"prepare": "husky",
"docs:dev": "magidoc dev -f docs/magidoc.mjs -m bun",
"drizzle-kit": "drizzle-kit generate --schema ./src/db/schema/ --dialect postgresql --out ./src/db/migrations",
"migrate": "bun run ./src/db/migrate.ts"
"migrate": "bun run ./src/db/migrate.ts",
"codegen": "graphql-codegen --config codegen.ts"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"@apollo/server": "^4.11.2",
"@node-rs/xxhash": "^1.7.4",
"axios": "^1.7.7",
"@node-rs/xxhash": "^1.7.6",
"axios": "^1.7.9",
"cheerio": "^1.0.0",
"deepl": "^1.0.13",
"drizzle-orm": "^0.36.3",
"drizzle-orm": "^0.36.4",
"fetch-cookie": "^3.0.1",
"graphql": "^16.9.0",
"graphql-scalars": "^1.23.0",
"graphql": "^16.10.0",
"graphql-scalars": "^1.24.0",
"graphql-tag": "^2.12.6",
"he": "^1.2.0",
"jsonwebtoken": "^9.0.2",
"jwk-to-pem": "^2.0.6",
"jwk-to-pem": "^2.0.7",
"moment": "^2.30.1",
"moment-timezone": "^0.5.46",
"node-cache": "^5.1.2",
Expand All @@ -36,32 +37,35 @@
"xml-js": "^1.6.11"
},
"devDependencies": {
"@commitlint/cli": "^19.6.0",
"@0no-co/graphqlsp": "^1.12.16",
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.15.0",
"@eslint/js": "^9.17.0",
"@graphql-codegen/cli": "5.0.3",
"@graphql-codegen/schema-ast": "^4.1.0",
"@magidoc/cli": "^6.2.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/bun": "^1.1.13",
"@types/bun": "^1.1.14",
"@types/cors": "^2.8.17",
"@types/he": "^1.2.3",
"@types/jsonwebtoken": "^9.0.7",
"@types/jwk-to-pem": "^2.0.3",
"@types/node": "^22.9.1",
"@types/node": "^22.10.2",
"@types/pdf-parse": "^1.1.4",
"@types/sanitize-html": "^2.13.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"concurrently": "^9.1.0",
"cross-env": "^7.0.3",
"drizzle-kit": "^0.28.1",
"eslint": "^9.15.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.12.0",
"globals": "^15.13.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"typescript": "^5.6.3",
"typescript-eslint": "^8.15.0"
"lint-staged": "^15.2.11",
"prettier": "^3.4.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.1"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx,mjs}": [
Expand Down
107 changes: 107 additions & 0 deletions src/__generated__/fragment-masking.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions src/__generated__/gql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5eb4304

Please sign in to comment.