{"id":23278262,"url":"https://github.com/marcramonmoreno/historian_app","last_synced_at":"2026-04-10T01:04:31.731Z","repository":{"id":267107256,"uuid":"900276948","full_name":"MarcRamonMoreno/Historian_app","owner":"MarcRamonMoreno","description":"Historian Data Tool - A secure internal web application for processing and visualizing historical data, built with React frontend and Flask backend. Features include data processing with configurable time ranges, tag configuration management, and CSV export capabilities. Access requires Tailscale VPN connection and proper permissions.","archived":false,"fork":false,"pushed_at":"2025-01-26T00:36:13.000Z","size":243,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T17:59:40.511Z","etag":null,"topics":["csv-export","data-processing","data-visualization","docker","docker-compose","flask","historian","python","react","web-application"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcRamonMoreno.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-08T11:12:30.000Z","updated_at":"2025-01-26T00:36:16.000Z","dependencies_parsed_at":"2024-12-08T12:24:25.473Z","dependency_job_id":"43854fd6-3859-45cd-bb18-11b54b841929","html_url":"https://github.com/MarcRamonMoreno/Historian_app","commit_stats":null,"previous_names":["marcramonmoreno/historian_app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcRamonMoreno%2FHistorian_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcRamonMoreno%2FHistorian_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcRamonMoreno%2FHistorian_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcRamonMoreno%2FHistorian_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcRamonMoreno","download_url":"https://codeload.github.com/MarcRamonMoreno/Historian_app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247479398,"owners_count":20945454,"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":["csv-export","data-processing","data-visualization","docker","docker-compose","flask","historian","python","react","web-application"],"created_at":"2024-12-19T22:20:31.955Z","updated_at":"2025-12-30T23:06:26.324Z","avatar_url":"https://github.com/MarcRamonMoreno.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Historian Data Tool\n\nA secure internal web application for processing and managing historical data with a React frontend and Flask backend. The application is accessible only through Tailscale VPN connection.\n\n## Access Requirements\n\n1. **Tailscale VPN**\n   - Must have Tailscale VPN installed on your device\n   - Need to be granted access to the network by the administrator\n   - Join the Tailscale network using provided credentials\n\n2. **Application Access**\n   - Frontend: http://hostname:3002\n   - Backend API: http://hostname:5002\n   - Contact the administrator for actual hostname and access permissions\n\n## Features\n\n- Data processing with configurable time ranges and frequencies\n- Configuration management for tag selections\n- Real-time tag search and filtering\n- CSV file generation and download\n- Docker containerization for easy deployment\n\n## Tech Stack\n\n### Backend\n- Python 3.x\n- Flask\n- pandas\n- pyodbc\n- SQL Server connection\n\n### Frontend\n- React\n- Tailwind CSS\n- Modern React Hooks\n- Responsive UI components\n\n## Prerequisites\n\n- Docker and Docker Compose\n- Node.js (for local development)\n- Python 3.x (for local development)\n- SQL Server ODBC Driver 18\n\n## Project Structure and Configuration\n\n```\nhistorian_app/\n├── backend/\n│   ├── app.py                 # Flask application\n│   ├── available_tags.txt     # List of available tags\n│   ├── Dockerfile            # Backend container configuration\n│   ├── gunicorn.conf.py      # Gunicorn WSGI configuration\n│   ├── historian_processor.py # Data processing logic\n│   └── requirements.txt      # Python dependencies\n├── configurations/           # Tag configurations directory\n├── docker-compose.yml       # Docker services configuration\n├── frontend/\n│   ├── Dockerfile          # Frontend container configuration\n│   ├── package.json        # Frontend dependencies\n│   ├── postcss.config.js   # PostCSS configuration\n│   ├── public/\n│   │   └── index.html     # Main HTML file\n│   ├── src/\n│   │   ├── App.js         # Main application component\n│   │   ├── components/\n│   │   │   └── ui/\n│   │   │       ├── alert.jsx   # Alert component\n│   │   │       ├── button.jsx  # Button component\n│   │   │       └── input.jsx   # Input component\n│   │   ├── ConfigManager.js    # Configuration management\n│   │   ├── DataProcessor.js    # Data processing interface\n│   │   ├── hooks/\n│   │   │   └── useAPI.js      # API hook\n│   │   ├── index.css          # Global styles\n│   │   ├── index.js           # Entry point\n│   │   └── lib/\n│   │       └── utils.js       # Utility functions\n│   └── tailwind.config.js     # Tailwind configuration\n├── readme.md\n└── technical-docs.md          # Technical documentation\n```\n\n### Required Configuration Changes\n\nBefore deploying the application, you need to update several configuration files:\n\n1. **Database Connection Configuration**\n   \n   In both `backend/app.py` and `backend/historian_processor.py`, update the database connection string:\n   ```python\n   conn_str = (\n       \"DRIVER={ODBC Driver 18 for SQL Server};\"\n       \"SERVER=hostname;\"            # Replace with your SQL Server hostname\n       \"DATABASE=database_name;\"     # Replace with your database name\n       \"UID=database_username;\"      # Replace with your database username\n       \"PWD=database_password;\"      # Replace with your database password\n       \"TrustServerCertificate=yes;\"\n       \"MARS_Connection=yes;\"\n       \"Packet Size=32768\"\n   )\n   ```\n\n2. **Docker Compose Configuration**\n   \n   In `docker-compose.yml`, update the hostname for both services:\n   ```yaml\n   services:\n     backend:\n       ports:\n         - \"hostname:5002:5000\"    # Replace hostname with your actual hostname\n     \n     frontend:\n       ports:\n         - \"hostname:3002:3000\"    # Replace hostname with your actual hostname\n       environment:\n         - REACT_APP_API_URL=http://hostname:5002/api    # Replace hostname\n   ```\n\n3. **Frontend API Configuration**\n   \n   In `frontend/src/hooks/useAPI.js`, update the default API URL:\n   ```javascript\n   const API_URL = process.env.REACT_APP_API_URL || 'http://hostname:5002/api';  // Replace hostname\n   ```\n\n4. **Available Tags Configuration**\n   \n   Update `backend/available_tags.txt` with your list of available tags:\n   ```text\n   TT_4112_AVG\n   AT_1011_02\n   CL1001_FEED_VOLUME_SP\n   ...\n   ```\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/historian-data-tool.git\ncd historian-data-tool\n```\n\n2. Create necessary directories:\n```bash\nmkdir -p configurations\n```\n\n3. Configure the application:\n   - Update database credentials in backend files\n   - Set the appropriate hostname in docker-compose.yml\n   - Update available_tags.txt\n\n4. Start the application using Docker Compose:\n```bash\ndocker-compose up --build\n```\n\nThe application will be available at:\n- Frontend: http://your_hostname:3002\n- Backend API: http://your_hostname:5002\n\n## Development Setup\n\n### Backend\n1. Create a virtual environment:\n```bash\ncd backend\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n2. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n3. Run the Flask application:\n```bash\npython app.py\n```\n\n### Frontend\n1. Install dependencies:\n```bash\ncd frontend\nnpm install\n```\n\n2. Start the development server:\n```bash\nnpm start\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Database Connection Errors**\n   - Verify database credentials in app.py and historian_processor.py\n   - Ensure SQL Server is accessible from the application\n   - Check if ODBC Driver 18 is properly installed\n\n2. **Port Conflicts**\n   - Ensure ports 3002 and 5002 are available\n   - Check for other services using these ports\n   - Modify docker-compose.yml if needed\n\n3. **Configuration Issues**\n   - Verify hostname configuration in all relevant files\n   - Ensure configuration files have correct permissions\n   - Check if available_tags.txt exists and contains valid tags\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Security Notes\n\n- Always use secure passwords and keep them confidential\n- Regularly update dependencies for security patches\n- Use HTTPS in production environments\n- Implement proper access controls and authentication\n- Regular security audits and updates\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Support\n\nFor support and questions, please contact your system administrator or open an issue in the repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcramonmoreno%2Fhistorian_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcramonmoreno%2Fhistorian_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcramonmoreno%2Fhistorian_app/lists"}