Vike enables you to create your own framework tailored to your company's requirements.

It's a powerful way to scale your teams, and to ensure a cohesive stack throughout your company. See Overview > Why Vike > Build your own framework.

Your framework can include everything (frontend, backend, data fetching, authentication, deployment, error tracking, analytics, ...) so that your Product Developers can focus on what they do best: building user interfaces.

Getting started

First step

We recommend getting started by creating a regular Vike app. Once you are satisfied with your stack then progressively move code from the user-land (code inside the app's Git repository) to your framework (code inside node_modules/my-framework/).

Progressively create your framework

Once you are satisfied wit the stack of your regular Vike app, progressively create your framework.

You can achieve that by progressively applying one or more of the following steps:

  • Create your own Vike extension that contains all your configuration.
    // pages/+config.js
     
    import react from 'vike-react/config'
    import apollo from 'vike-react-apollo/config'
    import myFramework from 'my-framework/config'
     
    export default {
      ssr: false, 
      extends: [react, apollo] 
      extends: [myFramework] 
    }
  • Create custom settings, so that your Product Developers can easily configure your framework.
    // pages/+config.js
     
    import myFramework from 'my-framework/config'
     
    export default {
      myCustomSetting: true,
      extends: [myFramework]
    }
  • Create your own CLI.
    // package.json
     
    {
      "scripts": {
        "dev": "my-framework",
        "build": "my-framework build",
        "preview": "my-framework preview"
      }
    }
  • Move your server code to be built into your framework.
  • Move deployment logic to be built into your framework.
    // package.json
     
    {
      "scripts": {
        "dev": "my-framework",
        "build": "my-framework build",
        "preview": "my-framework preview",
        "deploy": "my-framework deploy"
      }
    }
  • Add utilities to your framework, such as error tracking or analytics.

Feel free to reach out to the Vike team if you have any questions, and sponsorship is welcome for a tight-knit collaboration.