{"id":16767213,"url":"https://github.com/j-mendez/polyglot-starter","last_synced_at":"2026-02-07T03:31:10.161Z","repository":{"id":106985227,"uuid":"356346204","full_name":"j-mendez/polyglot-starter","owner":"j-mendez","description":"a deno polyglot persistence starter -  (mongodb, redis, meilisearch)","archived":false,"fork":false,"pushed_at":"2022-08-20T12:59:34.000Z","size":200,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T19:42:53.501Z","etag":null,"topics":["deno","deno-rest-starter","deno-starter","lambda","meilisearch","micro-services","polyglot-persistence","redis","rest-starter"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-mendez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-09T17:12:05.000Z","updated_at":"2024-07-11T00:31:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"29f8ed93-86f4-4d17-b8fb-7441a4eac82c","html_url":"https://github.com/j-mendez/polyglot-starter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/j-mendez/polyglot-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mendez%2Fpolyglot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mendez%2Fpolyglot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mendez%2Fpolyglot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mendez%2Fpolyglot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-mendez","download_url":"https://codeload.github.com/j-mendez/polyglot-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mendez%2Fpolyglot-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29185344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T00:44:15.062Z","status":"online","status_checked_at":"2026-02-07T02:00:07.217Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","deno-rest-starter","deno-starter","lambda","meilisearch","micro-services","polyglot-persistence","redis","rest-starter"],"created_at":"2024-10-13T06:08:39.429Z","updated_at":"2026-02-07T03:31:10.139Z","avatar_url":"https://github.com/j-mendez.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno-rest-starter\n\n[![j-mendez](https://circleci.com/gh/j-mendez/polyglot-starter.svg?style=svg)](https://circleci.com/gh/j-mendez/polyglot-starter)\n[![Deploy to Amazon ECS](https://github.com/j-mendez/deno-rest-starter/actions/workflows/aws.yml/badge.svg)](https://github.com/j-mendez/deno-rest-starter/actions/workflows/aws.yml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/eab3ba37ee4e35f3e6e6/maintainability)](https://codeclimate.com/github/j-mendez/deno-rest-starter/maintainability)\n\na production ready deno starter focused on making tacos. Setup with redis, mongodb, and meilisearch model syncing.\n\n## Getting Started\n\nYou can start the application locally or using docker. The simplest option to get started is using docker and compose.\n\n### Docker\n\nmake sure to have [docker](https://docs.docker.com/get-docker) and [compose](https://docs.docker.com/compose/install) installed. The docker image is using a slim alpine build. On intial container start, its safe to ignore the log output /usr/lib/libstdc++.so.6 on the alpine image.\n\n1. `docker-compose up`\n\n### Local\n\nMake sure to have deno installed. If your using mac you can use `brew install deno`. If your starting the application locally make sure to have [mongodb](https://www.mongodb.com) running for database operations. You need to add a `.env` file and add `DB_URL=$URL_DB_URL`, replace `$URL_DB_URL` with your database endpoint.\n\n1. `deno run --allow-read --allow-env --allow-net main.ts`\n\n## Pages\n\nPages are views that are server side rendered.\n\n| url           | params | models | description                            |\n| ------------- | ------ | ------ | -------------------------------------- |\n| /pages/orders | no     | Orders | Get a list of recent orders from redis |\n| /pages/order  | no     | Orders | Find order from redis or meilisearch   |\n| /pages/create | no     | Orders | Create a new random order              |\n\n## Validation\n\nREST validation is done through [validator-middleware](middlewares/validator.ts).\n\n## Middlewares\n\nbelow are a list of custom middlewares in registration order.\n\n1. [rate-limiting](middlewares/rate-limiting.ts)\n2. [body-parser](middlewares/body-parser.ts)\n3. [errors](middlewares/errors.ts#L8)\n4. [redirect](middlewares/redirect.ts)\n5. [validator](middlewares/validator.ts)\n6. [404](middlewares/errors.ts#L3)\n\n## Databases\n\nBelow are a list of databases used. Mongodb is one of the databases used in the application. If your using docker and need an admin tool navigate to `localhost:8081`. We use [meilisearch](https://github.com/meilisearch/MeiliSearch) for the search server.\n\n1. [redis](databases/redis.ts)\n2. [mongo](databases/mongodb.ts)\n3. [meilisearch](databases/meilisearch.ts)\n\n## Testing\n\nThe app is setup with assertion testing that handles redirection to valid responses for a rest api. When building new features handle the validation through assertions inside the file.\n\nTo run unit test|e2e|intg run `deno test --allow-read`.\n\nFor integration test run `./integrations/run.sh`.\n\n### Benchmarks\n\nThe benchmarks are located in the [benchmarks](/benchmarks) directory. On each suite the rate limiting middleware is disabled. Please do not run in production since this will adjust the runtime of your server. Read [benchmarks-docs](docs/BENCHMARKS.md) for more information on the type of test, how to, average, and etc.\n\n## Env\n\nEnvironmental variables are handled through .env files. For an example look at the usage below. Check out [.env.defaults](.env.defaults) to see the full list.\n\n```\nPORT=8000\nMONGO_DB_PORT=27017\nMONGO_DB_NAME=taco-rocket\nMONGO_DB_URL=mongodb://mongodb:27017/?compressors=zlib\u0026gssapiServiceName=mongodb\nMONGO_DB_RETRY_TIMOUT=15000\nMEILISEARCH_DB_API_KEY=masterKey\nREDIS_DB_URL=redis\nSYSTEM_ADMIN_PASSWORD=password\n```\n\n## Auto-Loader\n\nAll routers in the `routes` folder are autoloaded into the application. Simply export as a named export called `router`.\n\n## Fixtures\n\nTo get started with testing the api you can use the `fixtures` inside the project. For more information read [fixtures-doc](docs/FIXTURES.md)\n\n## Web Assembly\n\nCompiling the taco creator visual is done with web assembly. To build the binary run `./assembly/build.sh` which outputs the file into the `src/assets/static` folder. Make sure to have [AssembyScript](https://www.assemblyscript.org/) installed locally.\n\n```\n./assembly/build.sh\n```\n\n## Deploying\n\nDeployment is done using [ECS](https://console.aws.amazon.com/ecs) for clustering, security groups, load balancing, logging, volumes, and elastic scaling. The docker image used for the api is at [image](https://hub.docker.com/r/jeffmendez19/taco-api)\n\n## About\n\nThis apps main goal is for CRUD, architecture, and security. Since security is a core focus for the application we are using [Deno](https://github.com/denoland) for the backend along with [oak](https://oakserver.github.io/oak/) as a middleware framework (\"express like\"). When you post an order, if the option is not a part of the ingredient list the order will be rejected with output of valid options. The ingredient list is in memory using `enum`. If we want to add the ability to add to the ingredients list we can either mutate the enum at runtime or use the database with a `seed` step to generate the intial ingredients based off the enums. For now neither was done and the option to add a new ingredient is set by bypassing the available options through the `customIngredients` property in the order item. For an example checkout [custom-order-fixture](./fixtures/post-custom-order.sh). Rate limiting is added as a security feature to protect against DDOS. The current rate is set to 2 request per 3 seconds, to adjust the middleware go to [Rate Limiting](./middlewares/rate-limiting.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-mendez%2Fpolyglot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-mendez%2Fpolyglot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-mendez%2Fpolyglot-starter/lists"}