curl -fsSL https://raw.githubusercontent.com/Mario-35/STEAN/main/scripts/stean.sh -o stean.sh && chmod +x stean.sh && ./stean.sh
use on local windows as production (for testing) use : script as install.ps1
- Fork/Clone : https://github.com/Mario-35/STEAN.git
- Install dependencies : npm install
- Fire up Postgres WITH Postgis on the default ports
- Make configuration/[development or production].json file (see example) or use first install (the file will be automatically create)
- npm run dev for dev, npm run build (vs script package.json)
- If database not exists the program create it.
The project run under nodeJS.
📦src
┣ 📂server // API Server
┃ ┣ 📂authentication // authentication and tokens
┃ ┣ 📂configuration // Configuration Server
┃ ┃ ┣ 📜.key // crypt Key
┃ ┃ ┗ 📜 configuration.json // configuration file
┃ ┣ 📂db
┃ ┃ ┣ 📂createDb // datas to create blank Database
┃ ┃ ┣ 📂dataAccess
┃ ┃ ┣ 📂entities // SensorThings entities
┃ ┃ ┣ 📂helpers
┃ ┃ ┣ 📂monitoring
┃ ┃ ┣ 📂queries
┃ ┃ ┗ 📜constants.ts // Constants for DB
┃ ┣ 📂enums // Enums datas
┃ ┣ 📂helpers // Application helpers
┃ ┣ 📂log // Logs tools
┃ ┣ 📂lora // loras functions
┃ ┣ 📂messages //all messages of the api
┃ ┣ 📂models //model descriptor
┃ ┣ 📂odata // Odata decoder
┃ ┃ ┣ 📂parser // Odata parser
┃ ┃ ┗ 📂visitor // Odata decoder process
┃ ┃ ┣📂builder // Odata builder process
┃ ┃ ┣📂helper // Odata helpers
┃ ┃ ┗📂pg // Odata postgres visitor
┃ ┣ 📂routes // routes API
┃ ┃ ┗ 📂helper // routes helpers
┃ ┃ ┣ 📜protected.ts // protected routes
┃ ┃ ┗ 📜unProtected.ts // open routes
┃ ┣ 📂types // data types
┃ ┣ 📂views // generated view
┃ ┃ ┣ 📂clas // class files
┃ ┃ ┣ 📂css
┃ ┃ ┣ 📂helpers // views helpers
┃ ┃ ┣ 📂html
┃ ┃ ┗ 📂js
┃ ┣ 📜constants.ts // App constants
┃ ┗ 📜index.ts // starting file
┣ 📂template // ApiDoc template
┣ 📂test
┃ ┣ 📂integration // Tests
┃ ┃ ┗ 📂files // files For importation tests
┃ ┣ 📜apidoc.json // Apidoc configuration
┃ ┗ 📜dbTest.ts // DB test connection
┗ 📜build.js // js file for building app