{"id":28321892,"url":"https://github.com/haksham/inter-boat","last_synced_at":"2026-04-14T05:31:35.216Z","repository":{"id":294825144,"uuid":"986420028","full_name":"Haksham/Inter-boat","owner":"Haksham","description":"Single host - multi client architecture - article provisioning interface.","archived":false,"fork":false,"pushed_at":"2025-05-23T12:43:38.000Z","size":226,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T01:38:48.627Z","etag":null,"topics":["caching","cookie","crud-application","express-mysql-session","expressjs","ioredis","loading-animations","mysql","npm","react","react-query","react-router","react-router-dom","redis-cache","responsive-design","routing","session-management","tailwindcss","vite"],"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/Haksham.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,"zenodo":null}},"created_at":"2025-05-19T15:23:55.000Z","updated_at":"2025-06-18T12:44:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"3712158c-8aaa-4ca6-bde2-713343d29966","html_url":"https://github.com/Haksham/Inter-boat","commit_stats":null,"previous_names":["haksham/inter-boat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Haksham/Inter-boat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FInter-boat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FInter-boat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FInter-boat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FInter-boat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haksham","download_url":"https://codeload.github.com/Haksham/Inter-boat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FInter-boat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31784251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["caching","cookie","crud-application","express-mysql-session","expressjs","ioredis","loading-animations","mysql","npm","react","react-query","react-router","react-router-dom","redis-cache","responsive-design","routing","session-management","tailwindcss","vite"],"created_at":"2025-05-25T13:09:47.400Z","updated_at":"2026-04-14T05:31:35.210Z","avatar_url":"https://github.com/Haksham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚤 Inter-Boat\n\nA full-stack platform for managing client-submitted articles, with host moderation, built using **React**, **Express**, **MySQL**, and **Redis** for server-side and client-side caching.\n\n---\n\n## 📁 Folder Structure\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view folder structure\u003c/summary\u003e\n\n```\ninter-boat/\n├── .gitignore\n├── LICENSE\n├── README.md\n├── requirements.txt\n├── sql_sample_data.txt\n├── backend/\n│   ├── middleware/\n│   │   └── session.js\n│   ├── routes/\n│   │   ├── clientRoute.js\n│   │   └── dataRoute.js\n│   ├── package.json\n│   ├── requirements.txt\n│   ├── server.js\n│   ├── .env\n│   ├── redisClient.js\n│   └── node_modules/\n├── frontend/\n│   ├── public/\n│   ├── src/\n│   │   ├── App.jsx\n│   │   ├── index.css\n│   │   ├── main.jsx\n│   │   └── components/\n│   │       ├── Add.jsx\n│   │       ├── Client.jsx\n│   │       ├── Edit.jsx\n│   │       ├── Footer.jsx\n│   │       ├── Header.jsx\n│   │       ├── Home.jsx\n│   │       ├── Host.jsx\n│   │       ├── LoadingSpinner.jsx\n│   │       ├── Login.jsx\n│   │       ├── NotFoundPage.jsx\n│   │       ├── Signup.jsx\n│   │       └── StatusFilter.jsx\n│   ├── index.html\n│   ├── package.json\n│   ├── requirements.txt\n│   ├── vite.config.js\n│   ├── eslint.config.js\n│   ├── .env\n│   └── node_modules/\n```\n\u003c/details\u003e\n\n---\n\n## 🚀 Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/your-username/inter-boat.git\ncd inter-boat\n```\n\n---\n\n### 2. Backend Setup\n\n#### a. Install Dependencies\n\n```bash\ncd backend\nnpm install\n```\n\n#### b. Configure Environment Variables\n\nCreate a `.env` file in the `backend/` directory:\n\n```env\nMYSQL_HOST=localhost\nMYSQL_PORT=3306\nMYSQL_USERNAME=your_mysql_user\nMYSQL_PASSWORD=your_mysql_password\nMYSQL_DATABASE=inter_boat\nSESSION_SECRET=your_session_secret\nEXPRESS_PORT=8000\nFRONTEND_URL=http://localhost:5173\nREDIS_URL=redis://localhost:6379\n```\n\n#### c. Set Up the Database\n\n- Create the database and tables using the following SQL:\n\n```sql\nCREATE DATABASE inter_boat;\nUSE inter_boat;\n\nCREATE TABLE users (\n  id INT AUTO_INCREMENT PRIMARY KEY,\n  username VARCHAR(50) NOT NULL UNIQUE,\n  password VARCHAR(255) NOT NULL,\n  role ENUM('host', 'client') NOT NULL,\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\nCREATE TABLE articles (\n  id INT AUTO_INCREMENT PRIMARY KEY,\n  title VARCHAR(255) NOT NULL,\n  content TEXT NOT NULL,\n  client_id INT NOT NULL,\n  submitted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n  FOREIGN KEY (client_id) REFERENCES users(id) ON DELETE CASCADE\n);\n\nCREATE TABLE article_status (\n  id INT AUTO_INCREMENT PRIMARY KEY,\n  article_id INT NOT NULL,\n  status ENUM('pending', 'accepted', 'rejected') DEFAULT 'pending',\n  updated_by INT NOT NULL,\n  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  FOREIGN KEY (article_id) REFERENCES articles(id) ON DELETE CASCADE,\n  FOREIGN KEY (updated_by) REFERENCES users(id)\n);\n```\n\n- Optionally, seed with some users and articles using [`sql_sample_data.txt`](sql_sample_data.txt).\n\n#### d. Start Redis Server\n\n```bash\nsudo apt update\nsudo apt install redis-server\nsudo systemctl enable redis-server\nsudo systemctl start redis-server\nredis-cli ping  # Should return: PONG\n```\n\n#### e. Start the Backend Server\n\n```bash\nnpm run dev\n```\n_or_\n```bash\nnpm start\n```\n\n---\n\n### 3. Frontend Setup\n\n#### a. Install Dependencies\n\n```bash\ncd ../frontend\nnpm install\n```\n\n#### b. Configure Environment Variables\n\nCreate a `.env` file in the `frontend/` directory:\n\n```env\nVITE_API_BASE_URL=http://localhost:8000\n```\n\n#### c. Start the Frontend Dev Server\n\n```bash\nnpm run dev\n```\n\nThe app will be available at [http://localhost:5173](http://localhost:5173).\n\n---\n\n## 🗄️ Database Tables\n\n- **users**: Stores user credentials and roles (`host` or `client`)\n- **articles**: Stores articles submitted by clients\n- **article_status**: Tracks the status (`pending`, `accepted`, `rejected`) of each article and who updated it\n\n---\n\n## ⚙️ Environment Variables\n\n**Backend `.env` example:**\n\n```env\nMYSQL_HOST=localhost\nMYSQL_PORT=3306\nMYSQL_USERNAME=your_mysql_user\nMYSQL_PASSWORD=your_mysql_password\nMYSQL_DATABASE=inter_boat\nSESSION_SECRET=your_session_secret\nEXPRESS_PORT=8000\nFRONTEND_URL=http://localhost:5173\nREDIS_URL=redis://localhost:6379\n```\n\n**Frontend `.env` example:**\n\n```env\nVITE_API_BASE_URL=http://localhost:8000\n```\n\n---\n\n## 📦 Dependencies\n\n### Backend\n\nSee [`backend/package.json`](backend/package.json):\n\n- express, cors, dotenv, mysql2, express-session, express-mysql-session  \n- ioredis, react-icons, nodemon (dev)\n\n### Frontend\n\nSee [`frontend/package.json`](frontend/package.json):\n\n- react, react-dom, react-router-dom, axios, tailwindcss  \n- @tailwindcss/vite, vite, vite-plugin-qrcode, react-icons  \n- @tanstack/react-query, eslint (dev), @vitejs/plugin-react (dev)\n\n---\n\n## 🛠️ Features\n\n- **Client Registration \u0026 Login**\n- **Host \u0026 Client Dashboards**\n- **Article Submission, Editing, Deletion**\n- **Host Moderation (Accept/Reject/Pending)**\n- **Status Filtering \u0026 Article Expansion**\n- **Session-based Authentication**\n- **Responsive UI with TailwindCSS**\n- **Role-based Access Control**\n- **Persistent MySQL-backed Sessions**\n- **Server-side caching with Redis**\n- **Client-side caching with React Query**\n- **Live QR code for dev server (via vite-plugin-qrcode)**\n- **404 Not Found Page**\n- **Reusable Header \u0026 Footer**\n- **Loading Spinners for Data Fetching**\n- **ESLint and code quality tools**\n\n---\n\n## 💡 Tips\n\n- Make sure MySQL and Redis are running and accessible with the credentials you provide.\n- Use different browsers or incognito mode to test host and client roles simultaneously.\n- For production, use hashed passwords and secure session management.\n- Environment files (`.env`) are ignored by git for security.\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License. See [LICENSE](./LICENSE) for details.\n\n---\n\n## 🤝 Contributing\n\nPull requests and suggestions are welcome! Please open an issue first to discuss what you would like to change.\n\n---\n\n## 👤 Author\n\n- [Harsh_V_M](mailto:harsh924hashvm@gmail.com)\n- [GitHub](https://github.com/haksham)\n\n---\n\nEnjoy using **Inter-Boat**!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaksham%2Finter-boat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaksham%2Finter-boat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaksham%2Finter-boat/lists"}