{"id":15233403,"url":"https://github.com/startupjs/startupjs","last_synced_at":"2025-05-15T20:07:24.131Z","repository":{"id":37092068,"uuid":"249459915","full_name":"startupjs/startupjs","owner":"startupjs","description":"⚡ Universal React Native + Web framework with isomorphic collaborative DB and observables","archived":false,"fork":false,"pushed_at":"2025-05-11T14:29:35.000Z","size":240968,"stargazers_count":107,"open_issues_count":124,"forks_count":49,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-11T15:30:35.557Z","etag":null,"topics":["express","framework","mongodb","nodejs","react","react-native","react-native-web","reactive-programming","sharedb"],"latest_commit_sha":null,"homepage":"https://startupjs-ui.dev.dmapper.co","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/startupjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2020-03-23T14:52:57.000Z","updated_at":"2025-05-11T14:29:40.000Z","dependencies_parsed_at":"2023-11-14T10:25:13.382Z","dependency_job_id":"657f83a5-d600-4fc6-9a9c-6d8035c0f604","html_url":"https://github.com/startupjs/startupjs","commit_stats":{"total_commits":3632,"total_committers":62,"mean_commits":58.58064516129032,"dds":0.6299559471365639,"last_synced_commit":"d10b77708d0a6c7d83d394ec0e192ee51ca2af49"},"previous_names":[],"tags_count":816,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startupjs%2Fstartupjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startupjs%2Fstartupjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startupjs%2Fstartupjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startupjs%2Fstartupjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/startupjs","download_url":"https://codeload.github.com/startupjs/startupjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253591758,"owners_count":21932879,"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","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":["express","framework","mongodb","nodejs","react","react-native","react-native-web","reactive-programming","sharedb"],"created_at":"2024-09-29T05:08:31.721Z","updated_at":"2025-05-15T20:07:19.095Z","avatar_url":"https://github.com/startupjs.png","language":"JavaScript","readme":"![Cover](https://user-images.githubusercontent.com/62799316/150987762-a6c2ef75-1396-4817-aab7-d4ee7a87b27b.png)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\n    StartupJS \u0026middot;\n    \u003ca href=\"https://www.npmjs.com/package/startupjs\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/startupjs.svg?style=flat\" /\u003e\u003c/a\u003e\n    \u003ca href=\"#contributing--troubleshooting\"\u003e\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue\" /\u003e\n  \u003c/h1\u003e\n  \u003ca href=\"#quickstart\"\u003eQuickstart\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#native-development-ios-and-android\"\u003eNative\u0026nbsp;development\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#ide-configuration\"\u003eIDE\u0026nbsp;support\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#documentation\"\u003eDocs\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#production\"\u003eProduction\u003c/a\u003e\n\u003c/div\u003e\n\n## What is StartupJS?\n\nStartupJS is a **full-stack framework** that consists of:\n\n- **Frontend**\n  - Isomorphic React [native](https://facebook.github.io/react-native/) and [web](https://react.dev/) based on [Expo](https://expo.dev/)\n- **Backend**\n  - [ExpressJS](https://expressjs.com/)\n- **Collaborative Database**\n  - [MongoDB](https://www.mongodb.com/) which runs behind [ShareDB](https://github.com/share/sharedb) and a client-server observable [Teamplay ORM](https://teamplay.dev/)\n\n## Quickstart\n\n### Requirements\n\nStartupJS app requires:\n\n- [Node 22+](https://nodejs.org/)\n- [Yarn](https://yarnpkg.com/) (optional, but strongly recommended)\n\n### Installation\n\n1. Create a new Expo app and go into it:\n\n    **Note:** You can use any Expo template you want\n\n    - if you are using **yarn** (recommended):\n\n        ```\n        yarn create expo-app myapp\n        ```\n\n        ```\n        cd myapp\n        ```\n\n        ```\n        corepack enable \u0026\u0026 echo 'nodeLinker: node-modules' \u003e .yarnrc.yml \u0026\u0026 corepack use yarn@4\n        ```\n\n        \u003e **Warning:** If `corepack` is not installed in your system, install it with:\n        \u003e\n        \u003e    ```\n        \u003e    npm install -g corepack\n        \u003e    ```\n        \u003e\n        \u003e and re-run the last command.\n\n    - if you are using **npm**:\n\n        ```\n        npx create-expo-app@latest myapp\n        ```\n\n        ```\n        cd myapp\n        ```\n\n2. Install startupjs into your app:\n\n    ```\n    npm init startupjs@canary\n    ```\n\n3. Wrap your root component into `\u003cStartupjsProvider\u003e` from `startupjs` (when using expo-router it's in `app/_layout.tsx`):\n\n    ```jsx\n    import { StartupjsProvider } from 'startupjs'\n    // ...\n    return (\n      \u003cStartupjsProvider\u003e\n        ...\n      \u003c/StartupjsProvider\u003e\n    )\n    ```\n\n4. Start expo app with `yarn start` (or `npm start`).\n\n\u003e [!WARNING]\n\u003e If Fast Refresh (hot reloading) is not working (this might be the case if you created a bare expo project),\n\u003e add `import '@expo/metro-runtime'` to the top of your entry file.\n\n## Known issues\n\nOn the current version of Expo (v51) the Hermes JS engine does not support `FinalizationRegistry` yet on iOS/Android.\nBecause of this there are known memory leaks. To workaround this issue until Hermes adds support for it, please\nspecify a different JS engine (`jsc`) in `app.json`:\n\n```json\n{\n  \"expo\": {\n    \"jsEngine\": \"jsc\"\n  }\n}\n```\n\nIf you would have issues running Android, you can use V8 engine on it: [`react-native-v8`](https://github.com/Kudo/react-native-v8)\n\n## Native Development (iOS and Android)\n\nStartupJS uses Expo by default which should guide you through installation steps itself, just run `yarn start -c`\n(`-c` flag is to clear the JS compilation cache) and press `i` to launch iOS simulator or `a` to launch Android simulator.\n\n## IDE configuration\n\n### [![Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-grey?style=for-the-badge\u0026logo=visual-studio-code)](https://code.visualstudio.com/)\n\n#### Step 1: Add support for ESLint errors highlighting\n\n1. Install extension [`vscode-eslint`](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n2. Restart VS Code\n\n#### Step 2 (optional): Pug syntax highlighting\n\nIf you are gonna be using `pug` instead of pure JSX, add support for Pug syntax highlighting:\n\n1. Install extension [`vscode-react-pug`](https://marketplace.visualstudio.com/items?itemName=kaminaly.vscode-react-pug)\n2. Restart VS Code\n\n#### Step 3 (optional): Stylus syntax highlighting\n\nIf you are gonna be using `styl` to define styles, add support for Stylus syntax highlighting:\n\n1. Install extension [`vscode-startupjs`](https://marketplace.visualstudio.com/items?itemName=startupjs.vscode-startupjs)\n2. Restart VS Code\n\n## Documentation\n\nThe main things you'll need to know to get started with StartupJS are:\n\n1. [React Native](https://reactnative.dev/)\n1. [Teamplay ORM](https://teamplay.dev/) (all `teamplay` stuff should be imported directly from `startupjs`)\n1. [StartupJS UI Components](https://startupjs-ui.dev.dmapper.co)\n\nTo launch your app to production read the following sections:\n\n1. [Production](#production)\n1. [Security](#security)\n\n## Production\n\nTo deploy your app to production, run `yarn build` to build the server and web code and `yarn start-production` to run it.\n\nBy default for local development instead of a full MongoDB and Redis the startupjs app uses their mocks ([`mingo`](https://github.com/kofrasa/mingo) and [`ioredis-mock`](https://github.com/stipsan/ioredis-mock)).\n\nIt is strongly recommended to use the actual MongoDB and Redis in production (and it is **required** if you want to run multiple instances of the application).\n\nTo use MongoDB and Redis, specify `MONGO_URL` and `REDIS_URL` environment variables when running the `yarn start-production` command.\n\nYou can also provide these environment variables when doing local development through the `yarn start -c` command.\n\nTo deploy the native apps use the [Expo EAS](https://expo.dev/eas) service -- `eas build` and `eas submit`.\n\n## Advanced\n\nTo gain further deep knowledge of StartupJS stack you'll need get familiar with the following technologies it's built on:\n\n1. [React](https://reactjs.org/)\n1. [React Native](https://facebook.github.io/react-native/) for the Native-frontend (iOS, Android, etc.).\n1. [Teamplay ORM](https://teamplay.dev/).\n1. [Expo Router](https://docs.expo.dev/router/introduction/) for routing and navigation.\n1. [Node.js](https://nodejs.org/) and [Express](https://expressjs.com/) for the backend.\n1. [MongoDB](https://docs.mongodb.com/manual/installation/) for the database.\n1. [ShareDB](https://share.github.io/sharedb/):\n    - A real-time collaborative database integration into React.\n    - Allows to sync data between your local state (similar to Redux) and the DB.\n    - Brings in collaboration functionality similar to Google Docs, where multiple users can edit the same data simultaneously.\n    - Uses WebSockets to send micro-patches to and from the server whenever there are any changes to the data you are subscribed to.\n    - Uses observables to automatically rerender the data in React, similar to [MobX](https://mobx.js.org/).\n1. [Redis](https://redis.io/) for the pub/sub (required by ShareDB) and locking functionality.\n1. [Pug](https://pugjs.org/) (optional) which is used besides JSX for templating.\n1. [Stylus](https://stylus-lang.com/) (optional) which is used besides CSS and inline styling for stylesheets.\n1. Code Quality control tools:\n    - [ESLint](https://eslint.org/)\n    - *optional* [TypeScript](https://www.typescriptlang.org/)\n\n## Version migration guides\n\nThe following guides are available to assist with migration to new major versions of StartupJS:\n\n- [Migration Guides](/docs/migration-guides)\n\n## Security\n\nStartupJS server is designed to be secure by default.\n\nFor the sake of simplifying quick prototyping, a new project you create with `startupjs init` will have security mechanisms turned off.\n\nYou are strongly encouraged to implement security for your project as early as possible by removing `secure: false` flag from the server initialization in your `server/index.js` file.\n\nThere are 3 types of security mechanisms you must implement:\n\n- [Access Control to MongoDB documents](https://github.com/startupjs/startupjs/tree/master/packages/sharedb-access)\n- [Server-only MongoDB Aggregations](https://github.com/startupjs/startupjs/tree/master/packages/server-aggregate)\n- [Validation of MongoDB documents using JSON Schema](https://github.com/startupjs/startupjs/tree/master/packages/sharedb-schema)\n\nIf you want to work on their implementation one by one, you can keep the `secure: false` flag and only add the ones you want to implement by specifying the following flags:\n\n```js\naccessControl: true,\nserverAggregate: true,\nvalidateSchema: true\n```\n\n**NOTE**: All 3 mechanisms are integrated for their simpler use into the ORM system. We are working on a guide on how to use them with the ORM. If you want help properly integrating it into your production project, please file an issue or contact [cray0000](https://github.com/cray0000) directly via email.\n\n## Contributing \u0026 Troubleshooting\n\nSee [CONTRIBUTING.md](/CONTRIBUTING.md)\n\n## License\n\nMIT\n\n© Pavel Zhukov\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartupjs%2Fstartupjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstartupjs%2Fstartupjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartupjs%2Fstartupjs/lists"}