{"id":17601073,"url":"https://github.com/viratsrivastava/devops-standard-deployment-modules","last_synced_at":"2026-01-29T04:48:36.882Z","repository":{"id":258664830,"uuid":"870759515","full_name":"ViratSrivastava/Devops-Standard-Deployment-Modules","owner":"ViratSrivastava","description":"This repository contains template modules for deploying a webapp for an ML based project as a showcase","archived":false,"fork":false,"pushed_at":"2024-10-17T18:22:25.000Z","size":206,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T05:33:35.360Z","etag":null,"topics":["aws","devops","docker-image","docker-imagem-cloudformation","dockerswarm","machine-learning","webapp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ViratSrivastava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-10T16:03:49.000Z","updated_at":"2024-10-17T18:22:29.000Z","dependencies_parsed_at":"2024-10-20T03:08:32.338Z","dependency_job_id":null,"html_url":"https://github.com/ViratSrivastava/Devops-Standard-Deployment-Modules","commit_stats":null,"previous_names":["viratsrivastava/devops-standard-deployment-modules"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViratSrivastava%2FDevops-Standard-Deployment-Modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViratSrivastava%2FDevops-Standard-Deployment-Modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViratSrivastava%2FDevops-Standard-Deployment-Modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViratSrivastava%2FDevops-Standard-Deployment-Modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViratSrivastava","download_url":"https://codeload.github.com/ViratSrivastava/Devops-Standard-Deployment-Modules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248728594,"owners_count":21152250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","devops","docker-image","docker-imagem-cloudformation","dockerswarm","machine-learning","webapp"],"created_at":"2024-10-22T12:08:28.078Z","updated_at":"2026-01-29T04:48:36.841Z","avatar_url":"https://github.com/ViratSrivastava.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Devops Standard Deployment Modules\n\n# Local Setup Instructions for ML Project\n\n## Frontend Setup (React)\n\n1. Install Node.js and npm:\n   - Download and install Node.js from [nodejs.org](https://nodejs.org/)\n\n   - This will also install npm (Node Package Manager)\n\n2. Create a new React project:\n\n   ```bash\n   npx create-react-app std-deployment\n\n   cd std-deployment\n   ```\n\n3. Install additional dependencies:\n\n   ```bash\n   npm install react-router-dom tailwindcss @craco/craco\n   ```\n\n4. Set up Tailwind CSS:\n\n   ```bash\n   npx tailwindcss init -p\n   ```\n\n5. Replace the content of `src` folder with the provided React components.\n\n6. Update `package.json` to use Craco:\n\n   ```json\n   \"scripts\": {\n     \"start\": \"craco start\",\n     \"build\": \"craco build\",\n     \"test\": \"craco test\",\n     \"eject\": \"react-scripts eject\"\n   }\n   ```\n\n7. Create a `craco.config.js` file in the root directory:\n\n   ```javascript\n   module.exports = {\n     style: {\n       postcss: {\n         plugins: [require('tailwindcss'), require('autoprefixer')],\n       },\n     },\n   };\n   ```\n\n8. Run the development server:\n\n   ```bash\n   npm start\n   ```\n\n## Backend Setup (Python/Flask)\n\n1. Install Python:\n   - Download and install Python from [python.org](https://www.python.org/downloads/)\n\n2. Create a new directory for the backend:\n\n   ```bash\n   mkdir deployment-backend\n   cd deployment-backend\n   ```\n\n3. Create a virtual environment:\n\n   ```bash\n   python -m venv venv\n   ```\n\n4. Activate the virtual environment:\n   - On Windows: `venv\\Scripts\\activate`\n   - On macOS/Linux: `source venv/bin/activate`\n\n5. Create the necessary files (`app.py`, `ml_model.py`, `requirements.txt`) with the provided content.\n\n6. Install the required packages:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n7. Run the Flask application:\n\n   ```bash\n   python app.py\n   ```\n\n## Docker Setup (Optional)\n\n1. Install Docker:\n   - Download and install Docker Desktop from [docker.com](https://www.docker.com/products/docker-desktop)\n\n2. Build the Docker image:\n\n   ```bash\n   docker build -t deployment-backend .\n   ```\n\n3. Run the Docker container:\n\n   ```bash\n   docker run -p 5000:5000 deployment-backend\n   ```\n\n## Final Steps\n\n1. Ensure your ML model file is in the correct location and update the path in `ml_model.py`.\n\n2. Update the API endpoint in the React frontend (`ModelInterface.js`) to match your local backend URL (usually `http://localhost:5000`).\n\n3. You should now be able to run both the frontend and backend locally!\n\n## Folder Structures\n\n## Frontend Structure (React)\n\n```\nml-project-frontend/\n│\n├── public/\n│   ├── index.html\n│   ├── favicon.ico\n│   └── manifest.json\n│\n├── src/\n│   ├── components/\n│   │   └── Sidebar.js\n│   │\n│   ├── pages/\n│   │   ├── Home.js\n│   │   ├── Overview.js\n│   │   ├── ModelInterface.js\n│   │   └── Contact.js\n│   │\n│   ├── assets/\n│   │   └── (images, icons, etc.)\n│   │\n│   ├── styles/\n│   │   └── index.css\n│   │\n│   ├── utils/\n│   │   └── api.js\n│   │\n│   ├── App.js\n│   └── index.js\n│\n├── package.json\n├── package-lock.json\n├── README.md\n├── .gitignore\n├── tailwind.config.js\n└── craco.config.js\n```\n\n## Backend Structure (Python/Flask)\n\n```\nCopyml-project-backend/\n│\n├── app/\n│   ├── __init__.py\n│   ├── routes.py\n│   ├── ml_model.py  # Moved here\n│   │\n│   ├── services/\n│   │   └── prediction_service.py\n│   │\n│   └── utils/\n│       └── data_preprocessing.py\n│\n├── tests/\n│   ├── __init__.py\n│   ├── test_routes.py\n│   └── test_ml_model.py\n│\n├── model/\n│   └── trained_model.joblib\n│\n├── config/\n│   └── config.py\n│\n├── logs/\n│   └── .gitkeep\n│\n├── app.py\n├── requirements.txt\n├── Dockerfile\n├── .gitignore\n├── README.md\n└── .env\n```\n\n# Running the ML Project\n\n## Step 1: Start the Backend\n\n1. Open a terminal and navigate to your backend directory:\n   ```\n   cd deployment-backend\n   ```\n\n2. Activate your virtual environment:\n   - On Windows:\n     ```\n     venv\\Scripts\\activate\n     ```\n   - On macOS/Linux:\n     ```\n     source venv/bin/activate\n     ```\n\n3. Ensure all dependencies are installed:\n   ```\n   pip install -r requirements.txt\n   ```\n\n4. Set any necessary environment variables:\n   - On Windows:\n     ```\n     set FLASK_APP=app.py\n     set FLASK_ENV=development\n     ```\n   - On macOS/Linux:\n     ```\n     export FLASK_APP=app.py\n     export FLASK_ENV=development\n     ```\n\n5. Run the Flask application:\n   ```\n   flask run\n   ```\n\n   Your backend should now be running on `http://localhost:5000`.\n\n## Step 2: Start the Frontend\n\n1. Open a new terminal window and navigate to your frontend directory:\n   ```\n   cd std-deployemnt\n   ```\n\n2. Ensure all dependencies are installed:\n   ```\n   npm install\n   ```\n\n3. Start the React development server:\n   ```\n   npm start\n   ```\n\n   Your frontend should now be running on `http://localhost:3000`.\n\n## Step 3: Access the Application\n\n1. Open a web browser and go to `http://localhost:3000`.\n2. You should see your React application running and be able to interact with it.\n\n## Troubleshooting\n\n- If you encounter any \"module not found\" errors in the backend, make sure you've activated the virtual environment and installed all dependencies.\n- If the frontend can't connect to the backend, check that the backend URL in your React code (probably in `src/utils/api.js` or similar) matches the URL where your Flask app is running.\n- Make sure both terminal windows (for backend and frontend) remain open while you're using the application.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviratsrivastava%2Fdevops-standard-deployment-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviratsrivastava%2Fdevops-standard-deployment-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviratsrivastava%2Fdevops-standard-deployment-modules/lists"}