{"id":23757253,"url":"https://github.com/teodevgroup/teo-nodejs","last_synced_at":"2025-09-05T04:31:38.540Z","repository":{"id":75901710,"uuid":"586544397","full_name":"teodevgroup/teo-nodejs","owner":"teodevgroup","description":"Node.js package for Teo.","archived":false,"fork":false,"pushed_at":"2024-12-30T14:51:37.000Z","size":1655,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T23:14:39.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teodevgroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-01-08T14:19:54.000Z","updated_at":"2024-12-14T05:42:03.000Z","dependencies_parsed_at":"2023-11-25T08:20:30.501Z","dependency_job_id":"c41dbf84-42ed-45f7-b0c5-edbbedaed0b8","html_url":"https://github.com/teodevgroup/teo-nodejs","commit_stats":{"total_commits":324,"total_committers":1,"mean_commits":324.0,"dds":0.0,"last_synced_commit":"cfde3d846fde79221d45ebce7e1cac005e2dd4de"},"previous_names":["teodevgroup/teo-nodejs"],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/teodevgroup/teo-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodevgroup%2Fteo-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodevgroup%2Fteo-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodevgroup%2Fteo-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodevgroup%2Fteo-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teodevgroup","download_url":"https://codeload.github.com/teodevgroup/teo-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodevgroup%2Fteo-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273469412,"owners_count":25111335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"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":[],"created_at":"2024-12-31T19:40:13.921Z","updated_at":"2025-09-05T04:31:33.519Z","avatar_url":"https://github.com/teodevgroup.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eTeo\u003c/h1\u003e\n  \u003ca href=\"https://crates.io/crates/teo\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/teo?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@teodevgroup/teo\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/%teodevgroup%2Fteo?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/teo/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/teo?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=yeannylam.teo-vscode\"\u003e\u003cimg src=\"https://img.shields.io/visual-studio-marketplace/v/yeannylam.teo-vscode?style=flat-square\u0026label=VSCode%20marketplace\u0026color=%2300AFD7\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/teodevgroup/teo/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/teodevgroup/teo.svg?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/teodevgroup/teo\"\u003e\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cdiv\u003e\u003cstrong\u003eSchema-driven\u003c/strong\u003e web server framework.\u003c/div\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://docs.teodev.io/getting-started/quickstart\"\u003eQuickstart\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://teodev.io/\"\u003eOfficial website\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://docs.teodev.io/\"\u003eDocs\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://blog.teodev.io\"\u003eBlog\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://teodev.io/discord\"\u003eDiscord\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003chr /\u003e\n\u003c/div\u003e\n\n## Introduction\n\nTeo is **schema-driven** web server framework. The server side API is native to Rust, Node.js and Python.\n\n## Highlights \u0026 Features\n\n* Native to **Rust**, **Node.js** and **Python**\n* Innovative schema definition inspired by **GraphQL** and **Prisma**\n* Auto database migration\n* Supports **MySQL**, **PostgreSQL**, **SQLite** and **MongoDB**\n* Generated **ORM** types and interfaces\n* Generated **query clients** for frontend\n* Very efficient and performant\n* Data sanitization, transformation and validation\n* Builtin user **sessions**\n* Builtin **permission** check\n* First in last out **middlewares**\n* Custom **route handlers**\n* Generated customizable **admin dashboard**\n* Plays great with AI tools\n\n## Getting started\n\nThe fastest way to get started with Teo is by following the [Quickstart guide](https://docs.teodev.io/getting-started/quickstart).\n\n### Installation\n\nInstall Node.js edition.\n\n```sh\nnpm install @teodevgroup/teo\n```\n\nInstall Python edition.\n\n```sh\npip install teo\n```\n\nInstall Rust edition.\n\n```sh\ncargo install teo\n```\n\n### Write a schema-only server\n\nTo write a server is quite simple with Teo. Create a file named `schema.teo`.\nSpecify which database to connect and which port to listen.\n\n```teo\nconnector {\n  provider: .sqlite,\n  url: \"sqlite::memory:\"\n}\n \nserver {\n  bind: (\"0.0.0.0\", 5050)\n}\n \nmodel User {\n  @id @autoIncrement @readonly\n  id: Int\n  @unique @onSet($if($presents, $isEmail))\n  email: String\n  name: String?\n  @relation(fields: .id, references: .authorId)\n  posts: Post[]\n}\n \nmodel Post {\n  @id @autoIncrement @readonly\n  id: Int\n  title: String\n  content: String?\n  @default(false)\n  published: Bool\n  @foreignKey\n  authorId: Int\n  @relation(fields: .authorId, references: .id)\n  author: User\n}\n```\n\nStart the server with `teo serve` command. Now you can create, update, delete,\nread, aggregate and group by. Read our\n[Query client guide](https://docs.teodev.io/guides/query-client-guides/crud)\nfor detailed usage.\n\n### Write custom handlers\n\nDeclare the handler in the schema.\n\n```teo\n@map(.get, \"/echo/:data\", interface: \"EchoCaptures\")\ndeclare nonapi handler echo(): Any\n```\n\nImplement the handler with program code.\n\n#### Node.js implementation\n\n```ts\nimport { App, Response, Request } from '@teodevgroup/teo'\nimport { EchoPathArguments } from './entities'\n \nconst app = new App()\napp.mainNamespace().defineHandler(\"echo\", (request: Request) =\u003e {\n    const captures: EchoCaptures = request.captures()\n    return Response.string(captures.data, \"text/plain\")\n})\napp.run()\n```\n\n#### Python implementation\n\n```python\nfrom asyncio import run\nfrom teo import App, Response, Request\nfrom entities import EchoCaptures\n \nasync def main():\n    app = App()\n    def echo_handler(request: Request):\n        captures: EchoCaptures = request.captures()\n        return Response.string(captures[\"data\"], \"text/plain\")\n    app.main_namespace().define_handler(\"echo\", echo_handler)\n    await app.run()\n \nrun(main())\n```\n\n#### Rust implementation\n\n```rust\nmod entities;\n \nuse tokio::main;\nuse teo::prelude::{App, Response, Result, path};\nuse crate::entities::EchoCaptures;\n \n#[main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    let app = App::new()?;\n    app.main_namespace_mut().define_handler(\"echo\", |captures: EchoCaptures| async move {\n        Ok::\u003cResponse, Error\u003e(Response::string(captures.data(), \"text/plain\"))\n    });\n    app.run().await\n}\n```\n\n## Tutorials\n\nWe prepared a [Beginner tutorial series](https://docs.teodev.io/getting-started/beginner-tutorial/write-a-schema-only-app)\nto help you learn and understand Teo.\n\n## Issues\n\nWelcome to submit issues in this repo.\n\n## Contributing\n\nRead our [Contributing guide](https://github.com/teodevgroup/teo/blob/main/CONTRIBUTING.md)\nto set projects up and start contributing.\n\n## License\n\nTEO is under Apache 2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodevgroup%2Fteo-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteodevgroup%2Fteo-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodevgroup%2Fteo-nodejs/lists"}