{"id":16788575,"url":"https://github.com/mna/tulip","last_synced_at":"2025-08-23T14:32:15.158Z","repository":{"id":145702240,"uuid":"321145941","full_name":"mna/tulip","owner":"mna","description":" Lua web framework based on lua-http and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2025-08-09T20:59:09.000Z","size":518,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T22:22:09.422Z","etag":null,"topics":["framework","lua","web"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["mna"],"custom":["https://www.buymeacoffee.com/mna"]}},"created_at":"2020-12-13T19:43:14.000Z","updated_at":"2025-08-09T20:59:25.000Z","dependencies_parsed_at":"2023-04-07T23:47:28.728Z","dependency_job_id":null,"html_url":"https://github.com/mna/tulip","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/mna/tulip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mna%2Ftulip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mna%2Ftulip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mna%2Ftulip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mna%2Ftulip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mna","download_url":"https://codeload.github.com/mna/tulip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mna%2Ftulip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271752100,"owners_count":24814745,"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-08-23T02:00:09.327Z","response_time":69,"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":["framework","lua","web"],"created_at":"2024-10-13T08:18:20.372Z","updated_at":"2025-08-23T14:32:15.129Z","avatar_url":"https://github.com/mna.png","language":"Lua","funding_links":["https://github.com/sponsors/mna","https://www.buymeacoffee.com/mna"],"categories":[],"sub_categories":[],"readme":"# tulip\n\nLua web framework based on [lua-http][http] and [PostgreSQL][pg].\n\n* Canonical repository: https://git.sr.ht/~mna/tulip\n* Issue tracker: https://todo.sr.ht/~mna/tulip\n* Documentation: https://man.sr.ht/~mna/tulip\n\n## Description\n\nTulip is a minimal and simple web framework (a framework for *web systems*,\nreally) that provides a lot with very little.  Using only Lua (currently 5.4)\nand the PostgreSQL database (currently 13), the framework packs the following\nfeatures:\n\n* HTTP and HTTPS ✔\n* HTTP/1.1 and HTTP/2 ✔\n* Concurrent handling of requests ✔\n* Message Queue-style (at-least-once) reliable asynchronous processing ✔\n* Fire-and-forget (at-most-once) publish-subscribe mechanism ✔\n* Statsd-compatible metrics collection ✔\n* Cron-like scheduled processing ✔\n* Hardened server with timeouts and connection capacity ✔\n* SQL injection, XSS and CSRF protections ✔\n* Template-based dynamic HTML page generation ✔\n* Static file-based serving ✔\n* Account registration, token-based validation and password reset ✔\n* Secure user authentication with cookie-based session ✔\n* User- and group-based authorization ✔\n* Straightforward pattern-based routes handler multiplexer ✔\n* Transactional database migrations runner ✔\n* Efficient database access with connection pooling ✔\n* Pluggable, extendable architecture ✔\n\nThe [Small is Beautiful (The Developer's Edition)][blog] blog post provides\nsome background and context about the vision and goals of this project.\n\n## Development\n\nClone the project and install the required dependencies:\n\n* libpq-devel (Fedora package)\n* openssl and openssl-devel (Fedora package)\n* libargon2-devel (Fedora package)\n* postgresql-12.x (Fedora package, for the psql command)\n* direnv (Fedora package, to manage environment variables)\n* zlib-devel (Fedora package)\n* mkcert (create certificates for localhost, https://github.com/FiloSottile/mkcert)\n* llrocks (locally-installed Lua modules, https://git.sr.ht/~mna/llrocks)\n* Docker and Docker Compose\n\nThen you should be able to prepare the environment and install the Lua dependencies\nby running the init script:\n\n```\n$ ./scripts/init.lua\n```\n\nTo run tests and benchmarks (be sure to check the configuration section below):\n\n```\n$ llrocks run test/main.lua\n\n# if there are benchmarks available:\n$ llrocks run bench/*.lua\n```\n\nTo view code coverage:\n\n```\n$ llrocks cover test/main.lua\n```\n\nNote that because some tests (e.g. the csrf middleware) run the server in a separate\nprocess and only the client requests are made from the actual LuaUnit-executed process,\ntest coverage reports lower numbers than what is actually covered.\n\n## Configuration\n\nWhile the `scripts/init.lua` script sets up most of the required configuration, some\nenvironment variables and secrets cannot be set automatically. Here's what the `.envrc`\nfile managed by `direnv` should contain:\n\n* `PGPASSFILE`: init-generated\n* `PGHOST`: init-generated\n* `PGPORT`: init-generated\n* `PGCONNECT_TIMEOUT`: init-generated\n* `PGUSER`: init-generated\n* `PGDATABASE`: init-generated\n* `TULIP_CSRFKEY`: init-generated\n* `TULIP_ACCOUNTKEY`: init-generated\n* `TULIP_SENDGRIDKEY`: set to a valid Sendgrid API key\n* `TULIP_TEST_FROMEMAIL`: set to a valid email address for tests\n* `TULIP_TEST_TOEMAIL`: set to a valid email address for tests\n\n## License\n\nThe [BSD 3-clause][bsd] license.\n\n[bsd]: http://opensource.org/licenses/BSD-3-Clause\n[http]: https://github.com/daurnimator/lua-http\n[pg]: https://www.postgresql.org/\n[blog]: https://mna.dev/posts/small-is-beautiful.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmna%2Ftulip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmna%2Ftulip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmna%2Ftulip/lists"}