An isomorphic (universal) web app starter project with Semantic UI integration. This project is designed with developer productivity and happiness in mind. This is because it uses Viewmodel for declarative components and state management. Viewmodel is easy-to-use and powerful, and fallback on React if needed. This starter has SSR, isomorphic routing built-in, and will render the initial component states directly. It is also highly extendable using Meteor's capabilities It doesn't rely on many dependancies but can already do a lot.
- Meteor for isomorphic builds, SSR, easy code splitting (dynamic imports), reactive data, user accounts...
- Viewmodel For components, state management, validation, bindings between state and view...
- React For the underlying layer of Viewmodel. It can be changed to Inferno according to Viewmodel, and this would imply some changes in this starter.
- Universal router and History to provide an easy-to-use, isomorphic router.
- Test suite for Viewmodel and React: enzyme, jest... See Viewmodel documentation for testing
- Debugging tool for Viewmodel: viewmodel-react-explorer component is included in the < App / > component, and let you play with the states of components
- Semantic UI For an easy-to-use component and styling
- Install Meteor
- In the command line, type:
git clone https://github.com/antoninadert/proto-starter.git
. Your folder must now be created - Go in this folder from the command line:
cd proto-starter
meteor update
(if needed)meteor npm install
(if needed)meteor npm update --save
(if needed)
If Meteor gets stuck in the process, you can try to press Ctrl+C to abort some (sometime invisible) tasks and resume installation.
meteor
Then open your localhost: http://localhost:3000/
/imports
This folder contains code that must be imported to be used (meteor convention). Mainly used to put your Component that will be imported later by server and client (isomorphic).
Remember to import your components in /both/routes.js
in order to use them.
/both
This folder contains isomorphic code, used by your app and server (this is a meteor convention).
Useful for putting collections, routes...
/client
This folder contains client (browser) code, Used for routing and initializing the project (browser-side).
/client/lib
This folder will be loaded first in the client (meteor convention)
/client/lib/semantic-ui
Contains semantic-ui stuff. It should generate .custom.semantic.ui automatically, as well as some files and folders related to semantic-ui.When running meteor
command, if semantic UI is not generating correctly, use Ctrl+C to stop generation, delete .custom.semantic.ui
but keep custom.semantic.ui
and try to run meteor
again
/server
This folder contains server code, Used for your meteor methods (pub/sub mechanism)
Then open your localhost: http://localhost:3000/
jest
- RxJS as this is handled by Viewmodel
- Redux as this is also handled by Viewmodel
- React-helmet as this is easy to generate this yourself using server-render package from meteor (See sink.appendToHead() method used in
/server/router.js
) - React router as universal router is more concise and simpler
- The first time you use the project, Meteor can take a while (15 min?) to initiate. This should only happen if Meteor is changing versions (Current version:
1.5.1
)
No CSS builder, as there are so many ways to do it I thought I let you figure this out. I will maybe create a new starter including Aphrodite for styling as this seems a good and simple approach.
Apache 2.0 Licence (see LICENCE file)
Copyright © Antonin Adert 2017 All Rights Reserved.