Apollo Universal Starter Kit
Use our chat to get help or to discuss general topics about the Apollo Universal Starter Kit.
Table of Contents
- First Run of Apollo Universal Starter Kit
- Project Structure
- Wiki Sections on Apollo Universal Starter Kit
- License Info
Why Use Apollo Universal Starter Kit
I Am a Developer
- Better productivity thanks to live reloading
- An example of the modular architecture that's easy to support and extend
- No need to develop typical functionalities for your app
- Zero Webpack configurations thanks to SpinJS
I Am a Client
- Your team can start creating an app for any platform – web, server, and mobile
- Your team wil be able to reuse the code they write for all the platforms
- Your app will work faster thanks to the use of GraphQL instead of REST
- Your app will be easier to support and evolve thanks to the modular architecture
- Your team can focus on the application features straightaway instead of creating the basic functionality
- Your app will be integrated with Stripe, one of the top payment processors
To relieve you from the burden of configuring the project, building the application structure, and implementing typical features, we've created Apollo Universal Starter Kit.
One such solution that helps to build and configure your Apollo Universal Starter Kit project without any complications is SpinJS, a custom build tool that configures Webpack for you. With SpinJS, we reduced the amount of errors that are caused by the third-party libraries used for building the project.
The starter kit also consists of many modules that you can augment and adapt to your specific application, or use as a reference when implementing basic features for your applications (even if you build them with other technologies).
If you want to learn more about the features available in Apollo Universal Starter Kit, follow to the dedicated Wiki section.
Learn more about the main modules in Architecture and Implemented Modules.
Architecture and Implemented Modules
Among all the approaches to building the application architecture, we chose the modular architecture. You can remove any built-in modules without breaking the application. We recommend that you develop your custom modules with the same idea in mind when using the starter kit.
The implemented modules are:
- Authentication. This module provides authentication via social networks (Facebook, GitHub, and Google using OAuth 2.0) and with username and password. It also implements functionality for refreshing a forgotten password.
- Authorization. Various user roles are available – the admin and registered user.
- Pagination. The app provides navigation between pages and presentation of entities.
- Contact Us Form. Provided functionality to send messages with attachments to the server side.
- Posts and Comments. The module includes functionality to add, delete, and update posts and comments.
- 404 Not Found Page. A minimalistic module for handling 404 requests.
- State Management. The application state stored in the database and on the client.
- Payments. The billing module provides functionality for recurring payments based on Stripe.
Modules in progress:
- Mobile Chat. The live chat is based on the famous React Native Gifted Chat UI and is powered by GraphQL subscriptions.
Here's a demo of Apollo Universal Starter Kit in work:
|stable||The latest stable version of the kit (recommended)|
|single||A single-package Apollo v2 version of the kit|
|apollo1||The Apollo v1 version of the kit|
|cli-crud||This version features a CLI to generate CRUD implementations|
First Run of Apollo Universal Starter Kit
Verify if you use Node.js 6.x or higher (Node.js 8.x is recommended) before running the starter kit in your development environment.
- Clone the stable branch of Apollo Universal Starter Kit.
git clone -b stable https://github.com/sysgears/apollo-universal-starter-kit.git cd apollo-universal-starter-kit
- Install the dependencies. Make sure that you use Yarn 1.0.0 or higher; or you can use NPM instead of Yarn to handle the starter kit dependencies and to run scripts.
- Seed sample data to the database. The command below will create new tables with sample data in SQLite:
- Run the starter kit in development mode:
For more information about running this starter kit for mobile development or Docker, consult the Getting Started Wiki section.
The project structure presents generally accepted guidelines and patterns for building scalable web and mobile applications.
The structure is fractal meaning the functionality is grouped primarily by feature rather than by file type. But the current structure isn't prescriptive, and you can change it however you need.
apollo-universal-starter-kit ├── config/ # Global application configurations ├── docs/ # Documentation ├── node_modules/ # Global Node.js modules ├── packages/ # Source code of the application │ ├── client/ # Front-end package │ │ └── src/ │ │ ├── app/ # Common front-end application code │ │ ├── modules/ # Front-end feature-modules, each module has: │ │ │ # components, containers, GraphQL queries, and redux reducers │ │ ├── testHelpers/ # Test helper for front-end integration tests │ │ └── index.tsx # Entry point to web front-end with hot code reload │ ├── common/ # Yarn package with common code, a Redux store, and logging │ ├── mobile/ # Mobile front-end package │ │ └── src/ │ │ ├── .spinrc.js # Mobile application properties │ │ └── index.ts # Entry point to mobile front-end with live code reload │ └── server/ # Back-end Yarn package │ ├── src/ │ │ ├── api/ # GraphQL API implementation │ │ ├── database/ # Database migrations and seeds │ │ │ └── migrations/ # Database migration scripts using Knex │ │ │ └── seeds/ # Database seed scripts using Knex │ │ ├── middleware/ # GraphQL Playground, GraphQL express and SSR rendering │ │ ├── modules/ # Back-end server feature-modules, each module has: │ │ │ # schema definition, resolvers, and sql queries │ │ ├── sql/ # Knex connector │ │ ├── testHelpers/ # Test helper for back-end integration tests │ │ ├── server.js # GraphQL api server setup │ │ └── index.ts # Entry point to back-end with hot code reload │ └── .spinrc.js # Server application properties └── tools/ # All build and CLI-related files
Wiki Sections on Apollo Universal Starter Kit
In the list below, you can follow to various documents that explain different aspects of running, using, and configuring Apollo Universal Starter Kit.
- Getting Started
- Configuring Apollo Universal Starter Kit
- Writing the Code
- Apollo Universal Starter Kit CLI: Scaffolding Feature Modules
- Available Scripts
- Gitter channel – ask questions, find answers, and participate in general discussions
- GitHub issues – submit issues and send feature requests
- Wiki – read documentation for the usage scenarios of the starter kit; edit the documentation
- FAQ – consult the Frequently Asked Questions section in Wiki
The SysGears team provides comprehensive support for commercial partners. Our team will give guidance on the usage of Apollo Universal Starter Kit and will help you build your application based on the kit.
Thanks a lot to all the wonderful people who contributed to Apollo Universal Starter Kit!
Thanks a lot to all our backers!
You can support this project by becoming a sponsor! Your logo will show up here with a link to your website.