background image
Getting Started

In this section, you'll install Apollo Universal Starter Kit on your development machine and run the project for web or mobile development.

  • For the list of technologies that were used in this starter kit, consult README.md
  • For the list of available features, consult the Features and Modules Wiki section

Installing and Running Apollo Universal Starter Kit
  1. Use Node.js 6.x or higher (Node.js 8.x is recommended).
  2. Clone the stable branch of Apollo Universal Starter Kit.
  3. git clone -b stable https://github.com/sysgears/apollo-universal-starter-kit.git
    cd apollo-universal-starter-kit
  4. Install the dependencies. Make sure that you use Yarn 1.0.0 or higher; you can also use NPM instead of Yarn.
  5. yarn
    NOTE: Apollo Starter Kit uses Yarn's special feature to handle the package architecture - workspaces. Using Yarn workspaces allows us to install all the dependencies that are listed in the root package.json as well as the dependencies in packages/client/package.json, packages/server/package.json, and packages/mobile/package.json from the root directory. Managing packages architecture this way isn't possible with NPM, which is why we advise using NPM to install the dependencies. Otherwise, you'll have to install the dependencies separately from each package - client, server, and mobile - to be able to run the project.
  6. Seed sample data to the database. The command below will create new tables with sample data in SQLite:
  7. yarn seed
  8. Run the starter kit in development mode:
  9. yarn watch
    Note: If you want to run the project on an Android or iOS device, check out the Running a React Native App with Expo and Running the Starter Kit in a Mobile Simulator sections.

After running yarn watch, your default browser will automatically open at http://localhost:3000/. You can start changing the application code, and the changes will be applied immediately thanks to live reloading. You can also open the app in multiple tabs and test it: Increase the counter or add a new post or comment, and you'll see that all opened tabs are updated simultaneously.

Writing the code