/simpleapp-project-template

project template use to create simpleapp project

Primary LanguageJavaScriptApache License 2.0Apache-2.0

simpleapp-project-template

project template use to create simpleapp project

Refer https://github.com/SIMITGROUP/simpleapp-generator to know what is simpleapp-generator

How to start:

  1. install simpleapp-generator
npm install -g @simitgroup/simpleapp-generator@latest
  1. edit config.json for your environment
{
    "definationsFolder":"./definations",
    "backendFolder":"./backend", 
    "backendPort":"8000",
    "mongoConnectStr":"mongodb://localhost:27017/admin?authMechanism=DEFAULT",
    "frontendFolder":"./frontend",
    "frontendPort":"8080",
    "openapi3Yaml":"./openapi.yaml",
    "keycloaksetting":{
        "OAUTH2_BASEURL":"https://keycloak-server-url",
        "OAUTH2_REALM":"realm-name",
        "OAUTH2_CONFIGURL":"https://keycloak-server-url",
        "OAUTH2_CLIENTID":"client-id",
        "OAUTH2_CLIENTSECRET":"client-secret-value",
        "AUTH_SECRET_KEY":"my-secret-key"    
    }
}
  1. Run generator for first time to generate frontend (nuxt), backend (nest) project
sh start-fresh.sh

It will take quite sometimes until you can access backend: http://localhost:8000/api (with multiple microservices ready) frontend: http://localhost:8080 (it redirect you to keycloak login page) Backend image

  1. Ctrl-c to stop the cli, future start frontend and backend separately
cd backend
pnpm start:dev
cd frontned
pnpm dev

Perform Development:

  1. edit or add file in definations folder
  2. use vscode to edit generated code:
    • backend/src/docs/*
    • frontend/pages/[xorg]/*
  3. when you wish to regenerate source code, then run:
sh regenerate.sh