Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saiforceone/create-storm-stack
NodeJS-based CLI to scaffold modern fullstack web applications with almost any modern frontend. STπRM (Storm) = Starlette + Tailwind CSS + Reactive UI (Vite) + MongodB
https://github.com/saiforceone/create-storm-stack
javascript nodejs python reactjs starlette typescript vite vue
Last synced: about 1 month ago
JSON representation
NodeJS-based CLI to scaffold modern fullstack web applications with almost any modern frontend. STπRM (Storm) = Starlette + Tailwind CSS + Reactive UI (Vite) + MongodB
- Host: GitHub
- URL: https://github.com/saiforceone/create-storm-stack
- Owner: saiforceone
- License: bsd-3-clause
- Created: 2023-09-21T02:56:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-12T16:11:57.000Z (9 months ago)
- Last Synced: 2024-04-14T10:48:30.137Z (7 months ago)
- Topics: javascript, nodejs, python, reactjs, starlette, typescript, vite, vue
- Language: TypeScript
- Homepage:
- Size: 352 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
* [Python 3.8+](https://www.python.org/)
* [NodeJs 18.x](https://nodejs.org/en)
* [Pipenv](https://pipenv.pypa.io/en/latest/) (refer to changes to Python's handling of modules or just install it with Homebrew)## 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
- [Starlette](https://www.starlette.io/) (Web Framework)
- [Tailwind CSS](https://tailwindcss.com/) (Styling)
- [Reactive UI](https://vitejs.dev/) (Vite)
- [MongoDB](https://www.mongodb.com/) (Database)## 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
```shell
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
```shell
pipenv shell
```
Run the project
```shell
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
```shell
npx create-storm-stack@latest makeModule --name [--plural --controllerOnly]
```**Note:** _the only required option is `--name `_
* `-name `: specifies the name of the module to be created. This name must be unique and follows the same naming conventions as above
* `--plural `: 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**
```shell
npx create-storm-stack@latest makeModule --name biscuit --plural biscuits
```
**Example of making an api-only module**
```shell
npx create-storm-stack@latest makeModule --name lemon --plural lemons --controllerOnly
```
#### Accessing your newly-created moduleWhen a module is created, your can access the corresponding api endpoint at `http://127.0.0.1:5000/api/` or `http://127.0.0.1:5000/api/`
Frontend components can be accessed at the `http://127.0.0.1:5000/#/` or `http://127.0.0.1:5000/#/`.
**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_/src/pages`: Frontend components will be added to this folder.**Note:** _More details will be provided in the developer docs/manual_