{"id":19513038,"url":"https://github.com/invrs/paradiso","last_synced_at":"2026-04-20T19:32:42.471Z","repository":{"id":33708864,"uuid":"37362236","full_name":"invrs/paradiso","owner":"invrs","description":"A framework for building universal, library-agnostic Node.js web apps","archived":false,"fork":false,"pushed_at":"2018-07-17T02:23:42.000Z","size":118,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-02-25T23:28:51.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"creationix/nvm","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invrs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-13T07:25:00.000Z","updated_at":"2016-01-15T02:08:20.000Z","dependencies_parsed_at":"2022-08-07T23:00:29.788Z","dependency_job_id":null,"html_url":"https://github.com/invrs/paradiso","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/invrs/paradiso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invrs%2Fparadiso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invrs%2Fparadiso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invrs%2Fparadiso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invrs%2Fparadiso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invrs","download_url":"https://codeload.github.com/invrs/paradiso/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invrs%2Fparadiso/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32062416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-10T23:28:33.892Z","updated_at":"2026-04-20T19:32:42.442Z","avatar_url":"https://github.com/invrs.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paradiso\n\nA library-agnostic framework for building concise, testable, and universal Node.js web apps.\n\n## Features\n\nSwitch out underlying libraries without changing application code.\n\nUses the [definite](https://github.com/invrs/definite) pattern to keep code clean, testable, and extensible.\n\n## Install\n\n```bash\nnpm install -g paradiso\n```\n\n## The basics\n\nParadiso is just a custom [definite](https://github.com/invrs/definite) class builder. Please [read more about definite](https://github.com/invrs/definite) if you haven't.\n\nParadiso classes have the following `definite` instances available:\n\n* [this.client](https://github.com/invrs/paradiso/blob/master/src/paradiso/client.coffee)\n* [this.route](https://github.com/invrs/paradiso/blob/master/src/paradiso/route.coffee)\n* [this.server](https://github.com/invrs/paradiso/blob/master/src/paradiso/server.coffee)\n\n## Getting started\n\nFirst, let's create a very simple project with the following structure:\n\n    app/\n      components/\n        - home.js\n      init/\n        - app.js\n        - client.js\n        - server.js\n        - styles.scss\n\n(**Protip**: Feel free to organize your files how you like. Paradiso is unopinionated.)\n\n#### App initializer\n\n`app/init/app.js`:\n\n```js\nimport paradiso from \"paradiso\"\n\nclass App {\n  client() {\n    return this.paradiso.client({\n      router: this.router(),\n      type:   \"mithril\"\n    })\n  }\n\n  router() {\n    return this.paradiso.router({\n      \"/\": \"../components/home\"\n    })\n  }\n\n  server() {\n    return this.paradiso.server({\n      port:   9000,\n      router: this.router(),\n      static: \"public\",\n      type:   \"express\"\n    })\n  }\n}\n\nexport default paradiso(App)\n```\n\n#### Client initializer\n\n`app/init/client.js`:\n\n```js\nimport app from \"./app\"\n\nexport default app().client()\n```\n\n#### Server initializer\n\n`app/init/server.js`: \n\n```js\nimport app from \"./app\"\n\nexport default app().server()\n```\n\n### Component\n\n`components/home.js`:\n\n```js\nimport paradiso from \"paradiso\"\n\nclass Home {\n  then() { return \"hello!\" }\n}\n\nexport default paradiso(Home)\n```\n\n### Build assets\n\nUse the `diso` command to run your initialization classes:\n\n```bash\ndiso init/client\n```\n\n(**Protip**: `diso` is just an alias for [the `def` command](https://github.com/invrs/definite#definite-executor))\n\n### Start server\n\nStart the web server:\n\n```bash\ndiso init/server\n```\n\nNow you have a functioning Paradiso project up and running at [127.0.0.1:9000](http://127.0.0.1:9000).\n\nThis project is available in the [getting-started](https://github.com/invrs/paradiso-example/tree/getting-started) branch of the example repo.\n\n### Components\n\nLet's build a more complex HTML page with content:\n\n`lib/component.js`:\n\n```js\nimport paradiso from \"paradiso\"\nexport default paradiso({\n  // Autoload dependencies\n  //\n  autoload: `${__dirname}/../components`\n})\n```\n\n`lib/view.js`:\n\n```js\nimport component from \"./component\"\nimport sugartags from \"./def-sugar\"\n\nexport default component({\n  // Views should never hold state\n  //\n  key: null,\n  \n  // Sugartags for templating\n  //\n  mixins: [ sugartags ]\n})\n```\n\n`components/layout/layout.view.js`:\n\n```js\nimport view from \"../lib/view\"\n\nclass LayoutView {\n  then() {\n    return HTML [\n      HEAD(this.options.title)\n      BODY(this.options.content)\n    ]\n  }\n})\n\nexport default view(LayoutView)\n```\n\n`components/home/home.js`:\n\n```js\nimport component from \"../lib/component\"\n\nclass Home {\n  then() {\n    let title = `home`\n    let content = [\n      H1(this.title),\n      P(`hello`)\n    ]\n\n    if this.options.server\n      return this.components.layout.view({ content, title })\n    else\n      return content\n  }\n}\n\nexport default component(Home)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvrs%2Fparadiso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvrs%2Fparadiso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvrs%2Fparadiso/lists"}