Skip to content

NodeJS-based CLI to scaffold modern fullstack web applications with almost any modern frontend. STπŸŒ€RM (Storm) = Starlette + Tailwind CSS + Reactive UI (Vite) + MongodB

License

Notifications You must be signed in to change notification settings

saiforceone/create-storm-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

S.T.πŸŒ€.R.M Stack CLI (beta)

Introducing the S.T.πŸŒ€.R.M Stack, the easiest way to create modern fullstack web application. We believe that using S.T.πŸŒ€.R.M will be a breeze πŸ™ƒ

Requirements

The S.T.πŸŒ€.R.M stack has a few core requirements shown below

Supported Platforms

The S.T.πŸŒ€.R.M Stack CLI aims to be platform-agnostic once the core dependencies are met. That said, below shows platform support currently.

  • βœ… Linux (Ubuntu 22.04+)
  • βœ… MacOS
  • βœ… Windows

The Main Stack

Things to keep in mind

  • This is an early version of the CLI and things may change in future versions
  • Some things might not work properly with later versions or Python
  • When running on windows, it is better to use Powershell or Gitbash when running storm-dev via npm

Creating your first S.T.πŸŒ€.R.M Stack project

Creating the project

To create your first project, in a terminal window, run the following and answer the prompts

npx create-storm-stack@latest

The command above will start the scaffolding process. Once you answer all the prompts, the process will start. Once completed, the instructions for running the project will be printed out.

Project Naming Conventions

Import note: Project names follow Python conventions so spaces or special characters are not allowed

  • βœ… my_storm_project
  • βœ… mystormproject
  • β›” my-storm-project
  • β›” my storm project

Running your project

Activate the virtual environment

pipenv shell

Run the project

npm run storm-dev

By default, your newly created S.T.πŸŒ€.R.M Stack project will be accessible from http://127.0.0.1:5000

Database Stuff

The default database for your newly created S.T.πŸŒ€.R.M Stack project will have the same name as your project. For example, if your project was called my_project the mongodb uri would be mongodb://localhost:27017/my_project.

Note: You may change the database settings as needed for your project.

S.T.πŸŒ€.R.M Stack Module System

The S.T.πŸŒ€.R.M Stack makes use of modules where a module is a collection of backend (controller + model) and optional frontend components. You can think of modules kinda like resources. More information on this will be in the official documentation.

Creating a module

From the root of your S.T.πŸŒ€.R.M Stack project, you can run the following command to create a module

npx create-storm-stack@latest makeModule --name <module_name> [--plural <pluralized_module_name> --controllerOnly]

Note: the only required option is --name <module_name>

  • -name <module_name>: specifies the name of the module to be created. This name must be unique and follows the same naming conventions as above
  • --plural <pluralized_module_name>: optionally specifies the pluralized name of the module. Setting this will make API endpoints and frontend paths more REST-like
  • --controllerOnly: optionally specifies if the creation of frontend components should be skipped for the module being created

Examples of module creation

Here are a few examples to get you started with creating your own modules

Example of making a normal module

npx create-storm-stack@latest makeModule --name biscuit --plural biscuits

Example of making an api-only module

npx create-storm-stack@latest makeModule --name lemon --plural lemons --controllerOnly

Accessing your newly-created module

When a module is created, your can access the corresponding api endpoint at http://127.0.0.1:5000/api/<module_name> or http://127.0.0.1:5000/api/<pluralized_module_name>

Frontend components can be accessed at the http://127.0.0.1:5000/#/<module_name> or http://127.0.0.1:5000/#/<pluralized_module_name>.

Note: Further details will be provided in the developer docs/manual

Important Files & Folders (Module)

When a module is created, several file are created and others are updated as shown below.

  • storm_modules/storm_modules.json: this file manages the entire module system
  • storm_controllers: controllers created will be added to this folder. The storm_controllers/__init__.py file will be automatically updated
  • storm_routes/__init__.py: This file is automatically updated when a module is created. There is no need to manually update this
  • storm_models: models created will be added to this folder.
  • storm_fe_<frontend>/src/pages: Frontend components will be added to this folder.

Note: More details will be provided in the developer docs/manual

About

NodeJS-based CLI to scaffold modern fullstack web applications with almost any modern frontend. STπŸŒ€RM (Storm) = Starlette + Tailwind CSS + Reactive UI (Vite) + MongodB

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published