{"id":15175234,"url":"https://github.com/asiff00/api-demo","last_synced_at":"2026-02-03T12:10:16.799Z","repository":{"id":255077179,"uuid":"848433863","full_name":"asiff00/API-Demo","owner":"asiff00","description":"This project is an API Key Manager application developed using Node.js, Express, and MongoDB. I created this demo project to practice API creation, handling, and Docker management as part of my web application development training. ","archived":false,"fork":false,"pushed_at":"2024-08-27T19:26:27.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T18:13:56.610Z","etag":null,"topics":["api","api-client","docker","docker-compose","dockerfile","express","expressapi","expressjs","javascript","jws","mongodb","webapi","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/asiff00.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-08-27T18:49:10.000Z","updated_at":"2024-08-27T19:32:17.000Z","dependencies_parsed_at":"2024-08-27T22:37:51.047Z","dependency_job_id":null,"html_url":"https://github.com/asiff00/API-Demo","commit_stats":null,"previous_names":["asiff00/api-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/asiff00/API-Demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asiff00%2FAPI-Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asiff00%2FAPI-Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asiff00%2FAPI-Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asiff00%2FAPI-Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asiff00","download_url":"https://codeload.github.com/asiff00/API-Demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asiff00%2FAPI-Demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263441869,"owners_count":23467203,"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":["api","api-client","docker","docker-compose","dockerfile","express","expressapi","expressjs","javascript","jws","mongodb","webapi","webapp"],"created_at":"2024-09-27T12:20:47.892Z","updated_at":"2026-02-03T12:10:16.739Z","avatar_url":"https://github.com/asiff00.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔑 API Key Manager 🔑\n\nThis project is an API Key Manager application developed using Node.js, Express, and MongoDB. I created this demo project to practice API creation, handling, and Docker management as part of my web application development training. To maximize your learning, I recommend creating a new project and typing each script yourself. Simply copying and pasting won't be as effective. Just being honest here. \n\n## 📒 It covers:\n\n* 📝 Sign up and log in.\n* 🗝️ Generate API keys.\n* 🔍 View their API keys and usage logs.\n* ⚙️ Use their API keys to access a sample `/multiply` endpoint.\n\n## 📸 Screenshots 📸\n\n**Login Page:**\n\n![Login Page](public/media/login.png)\n\n**Dashboard:**\n\n![Dashboard](public/media/dashboard.png)\n\n## ✨ Features ✨\n\n* **🔒 User Authentication:** Secure user signup and login with password hashing.\n* **🔑 API Key Generation:** Generates unique API keys for each user.\n* **🗂️ API Key Management:** Users can view and manage their generated API keys.\n* **📊 Usage Logs:** Tracks API calls made with each API key.\n* **🧪 Sample API Endpoint:** Provides a `/multiply` endpoint that demonstrates API key usage.\n* **🐳 Dockerized:** Easy setup and deployment with Docker and Docker Compose.\n\n## 🚀 Getting Started 🚀\n\n### 📋 Prerequisites 📋\n\n* 🐳 Docker\n* 🐳 Docker Compose\n\n### ⬇️ Installation ⬇️\n\n1. Clone the repo: `git clone https://github.com/your-username/api-key-manager.git`\n2. Navigate to the directory: `cd api-key-manager`\n3. Run: `docker-compose up -d`\n\n### ▶️ Usage ▶️\n\n1. Access the app: `http://localhost:3000`.\n2. Sign up or log in.\n3. Generate API keys and view usage logs on the dashboard.\n4. Use your API keys to access the `/multiply` endpoint.\n\n## 💻 API Endpoints 💻\n\n* **`/auth/signup` (POST):** Creates a new user account.\n* **`/auth/login` (POST):** Logs in an existing user.\n* **`/api/create-api-key` (POST):** Generates a new API key.\n* **`/api/user-data` (GET):** Retrieves API keys and usage logs.\n* **`/multiply` (POST):** Multiplies two numbers (requires API key).\n\n\u003cdetails\u003e\n  \u003csummary\u003e📂 Project Structure\u003c/summary\u003e\n\n```\napi-key-manager/\n│\n├── src/\n│   ├── config/\n│   │   └── database.js           # 🗄️ Database connection configuration\n│   │\n│   ├── controllers/\n│   │   ├── authController.js     # 💂 User authentication logic\n│   │   ├── apiKeyController.js   # 🗝️ API key management logic\n│   │   └── multiplyController.js # 🧪 Sample API endpoint logic\n│   │\n│   ├── middleware/\n│   │   └── auth.js               # 💂 Authentication middleware\n│   │\n│   ├── models/\n│   │   └── User.js               # 🧑 User model\n│   │\n│   ├── routes/\n│   │   ├── authRoutes.js         # 🚪 Authentication routes\n│   │   ├── apiKeyRoutes.js       # 🗝️ API key management routes\n│   │   └── multiplyRoutes.js     # 🧪 Sample API endpoint route\n│   │\n│   └── app.js                    # ⚙️ Main application file\n│\n├── public/\n│   ├── css/\n│   │   └── styles.css            # 🎨 Stylesheets\n│   │\n│   ├── js/\n│   │   └── main.js               # 🖥️ Client-side JavaScript\n│   │\n│   └── index.html                # 📄 Main HTML file\n│\n├── .dockerignore\n├── .gitignore\n├── Dockerfile                    # 🐳 Dockerfile for building the application image\n├── docker-compose.yml            # 🐳 Docker Compose configuration\n├── package.json                  # 📦 Project dependencies\n└── README.md                     # 📄 This file\n```\n\n\u003c/details\u003e\n\n\n## 🙌 Contributing 🙌\n\nContributions are welcome! Please open issues and pull requests.\n\n## 📄 License 📄\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasiff00%2Fapi-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasiff00%2Fapi-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasiff00%2Fapi-demo/lists"}