{"id":25193883,"url":"https://github.com/fliplet/fliplet-engineering-manager-test","last_synced_at":"2025-08-05T02:19:52.012Z","repository":{"id":276177017,"uuid":"928242168","full_name":"Fliplet/fliplet-engineering-manager-test","owner":"Fliplet","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-06T17:50:30.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T18:37:15.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Fliplet.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":"2025-02-06T10:00:53.000Z","updated_at":"2025-02-06T17:50:33.000Z","dependencies_parsed_at":"2025-02-06T18:37:56.210Z","dependency_job_id":"a4b88cab-9561-4948-a415-909938fa3727","html_url":"https://github.com/Fliplet/fliplet-engineering-manager-test","commit_stats":null,"previous_names":["fliplet/fliplet-engineering-manager-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fliplet%2Ffliplet-engineering-manager-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fliplet%2Ffliplet-engineering-manager-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fliplet%2Ffliplet-engineering-manager-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fliplet%2Ffliplet-engineering-manager-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fliplet","download_url":"https://codeload.github.com/Fliplet/fliplet-engineering-manager-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190258,"owners_count":20898702,"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":[],"created_at":"2025-02-09T23:39:32.793Z","updated_at":"2025-04-04T14:11:57.097Z","avatar_url":"https://github.com/Fliplet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Engineering Manager Test\n\n## Welcome to the Engineering Manager Test\n\nThis test is designed to evaluate your technical skills, problem-solving abilities, and critical thinking as an engineering manager at Fliplet. You will be working on a series of tasks that cover both backend and frontend development, as well as reviewing product requirements and providing written explanations for various scenarios.\n\nThe tasks are intended to simulate real-world challenges you might face in this role. We encourage you to demonstrate your expertise, creativity, and efficiency in solving these problems. Remember to document your thought process and any AI tools you use during the test.\n\nGood luck, and we look forward to reviewing your submission!\n\n\n## 📜 Instructions\n\n### **How to Take the Test**\n1. **Fork this repository** (do NOT submit a PR).\n2. Complete the tasks in the appropriate files.\n3. **Commit \u0026 push your changes** to your forked repo.\n4. **Share GitHub access** with `@fliplet.com`.\n5. **Log AI usage:**  \n   - **Provide all AI prompts used** (copy-paste them into `ai-prompts.md`).  \n   - **Summarize AI impact** (write about it in your README summary).  \n   - **List any AI-powered IDE tools used** (e.g., GitHub Copilot, Cursor, ChatGPT in VS Code).  \n\n---\n\n## 📂 Repository Structure\n```\n/engineering-manager-test/\n│── README.md  # Instructions \u0026 submission process\n│── ai-prompts.md  # All AI prompts used\n│── /backend/  # Backend coding tasks (Node.js, Express.js, AWS, Terraform)\n│── /frontend/  # Frontend Vue.js tasks\n│── /docs/  # PRD review \u0026 tech specs\n│── /solutions/  # Written explanations (AWS debugging, security, scaling)\n```\n\n## ✅ Evaluation Criteria\nYour submission will be judged on:\n1. **Technical Depth** – Demonstrates strong knowledge \u0026 reasoning.\n2. **Code Quality** – Readability, efficiency, maintainability.\n3. **AI Usage** – Allowed, but critical thinking must be evident.\n4. **AI Prompting Skill** – Ability to craft meaningful prompts and refine AI outputs.\n5. **Time Management** – Prioritization of effort within the given timeframe.\n\n---\n\n# 🛠️ Engineering Manager Tasks\n\n## **1️⃣ JavaScript/TypeScript Performance Task (20 min)**\n### **Task:**  \nOptimize the function below for handling large datasets **efficiently**.\n\n### **Scenario:**  \nYour company processes user records but must:\n- Deduplicate users.\n- Enrich missing email data asynchronously via an API.\n- Optimize performance when handling **1 million+ users**.\n\n### **File to Edit:**  \n`/backend/data-processor.js`\n\n```js\n// Sample dataset (users.json)\nconst users = [\n  { id: 1, name: \"Alice\", email: \"alice@email.com\" },\n  { id: 2, name: \"Bob\", email: null },\n  { id: 3, name: \"Alice\", email: \"alice@email.com\" },\n];\n\n// Mock API to fetch missing data\nasync function fetchUserData(id) {\n  return { email: `user${id}@email.com` };\n}\n\n// Optimize this function:\nasync function processUsers(users) {\n  let results = [];\n  for (let i = 0; i \u003c users.length; i++) {\n    let user = users[i];\n    if (!user.email) {\n      let enriched = await fetchUserData(user.id);\n      user.email = enriched.email;\n    }\n    results.push(user);\n  }\n  return results;\n}\n\nmodule.exports = processUsers;\n```\n\n---\n\n## **2️⃣ Express.js Rate Limiter Middleware (20 min)**\n### **Task:**  \nImplement a middleware to **limit API requests per tenant (organization).**\n\n### **Scenario:**  \nYour SaaS product allows **100 requests per minute per tenant**.\n\n### **File to Edit:**  \n`/backend/rate-limiter.js`  \n\n```js\nconst rateLimit = {}; // Object to track requests per tenant\n\nfunction rateLimiter(req, res, next) {\n  const tenant = req.headers[\"x-tenant-id\"];\n  if (!tenant) return res.status(400).json({ error: \"Missing tenant ID\" });\n\n  if (!rateLimit[tenant]) {\n    rateLimit[tenant] = { count: 1, startTime: Date.now() };\n  } else {\n    let elapsed = Date.now() - rateLimit[tenant].startTime;\n    if (elapsed \u003e 60000) { // Reset every minute\n      rateLimit[tenant] = { count: 1, startTime: Date.now() };\n    } else {\n      rateLimit[tenant].count++;\n      if (rateLimit[tenant].count \u003e 100) {\n        return res.status(429).json({ error: \"Rate limit exceeded\" });\n      }\n    }\n  }\n  next();\n}\n\nmodule.exports = rateLimiter;\n```\n\n---\n\n## **3️⃣ Vue.js Drag-and-Drop Component (25 min)**\n### **Task:**  \nImplement a **drag-and-drop UI** that allows users to add UI components to a web page preview.\n\n### **File to Edit:**  \n`/frontend/drag-drop.vue`  \n\n```vue\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003ch3\u003eDrag \u0026 Drop Components\u003c/h3\u003e\n    \u003cdiv class=\"library\"\u003e\n      \u003cbutton draggable=\"true\" @dragstart=\"dragStart('Text')\"\u003eText\u003c/button\u003e\n      \u003cbutton draggable=\"true\" @dragstart=\"dragStart('Button')\"\u003eButton\u003c/button\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"preview\" @drop=\"drop\" @dragover.prevent\u003e\n      \u003cp v-for=\"item in items\" :key=\"item\"\u003e{{ item }}\u003c/p\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n  data() {\n    return { items: [] };\n  },\n  methods: {\n    dragStart(type) {\n      event.dataTransfer.setData(\"text/plain\", type);\n    },\n    drop(event) {\n      let type = event.dataTransfer.getData(\"text/plain\");\n      this.items.push(type);\n    }\n  }\n};\n\u003c/script\u003e\n\n\u003cstyle\u003e\n.library { margin-bottom: 10px; }\n.preview { min-height: 100px; border: 1px dashed black; padding: 10px; }\n\u003c/style\u003e\n```\n\n---\n\n## **4️⃣ Infrastructure as Code (Terraform) (25 min)**\n### **Scenario:**  \nYou need to deploy an **ECS Fargate cluster** with a **load balancer**.\n\n### **File to Edit:**  \n`/backend/infra.tf`  \n\n```hcl\nprovider \"aws\" {\n  region = \"us-east-1\"\n}\n\nresource \"aws_vpc\" \"main\" {\n  cidr_block = \"10.0.0.0/16\"\n}\n\nresource \"aws_ecs_cluster\" \"main\" {\n  name = \"ecs-cluster\"\n}\n\nresource \"aws_lb\" \"main\" {\n  name               = \"ecs-load-balancer\"\n  internal           = false\n  load_balancer_type = \"application\"\n}\n\nresource \"aws_ecs_service\" \"service\" {\n  name            = \"app-service\"\n  cluster         = aws_ecs_cluster.main.id\n  desired_count   = 2\n  launch_type     = \"FARGATE\"\n}\n```\n\n---\n\n## **7️⃣ PRD Review \u0026 Critique (15 min)**\n### **Scenario:**  \nYour product team wrote a **bad PRD**. Find **3 critical issues**.\n\n### **File to Edit:**  \n`/solutions/prd-review.md`  \n\n```md\n# PRD Review\n\n## 📝 Instructions\nReview the following PRD and identify **3 critical issues**.\n\n## Example PRD\n### Feature: User Profile Management\n1. Users should be able to update their name and email.\n2. There is no authentication mechanism specified.\n3. No mention of error handling.\n\n## ✏️ Your Review\n- Issue 1:\n- Issue 2:\n- Issue 3:\n```\n\n---\n\n## **8️⃣ AWS Debugging Scenario (20 min)**\n### **Scenario:**  \nYou upgraded **Aurora Serverless Postgres v13 to v14**, but the cluster fails with:\n```\nERROR: Extension incompatible: some_extension v1.3 not compatible with Postgres v14\n```\n### **Task:**  \n- Identify **potential reasons for failure**.\n- Provide **a step-by-step debugging process**.\n- **Ensure minimal downtime** for production users.\n\n📄 **File to edit:** `/solutions/aws-debugging.md`\n\n---\n\n## **9️⃣ Scalability Strategy (20 min)**\n### **Scenario:**  \nYour application needs to **process and serve 10M+ images per day**.\n\n### **Task:**  \n- Design a **highly scalable architecture** on AWS.\n- Optimize **for cost-efficiency** (consider AWS Lambda, S3, Step Functions).\n- **Ensure smooth delivery** over weak mobile connections.\n\n📄 **File to edit:** `/solutions/scalability-plan.md`\n\n---\n\n## **🔟 Security Strategy: JWT Expiry Fix (20 min)**\n### **Scenario:**  \nYour security team found that **JWT access tokens never expire**, leaving the system vulnerable.\n\n### **Task:**  \n- Design a **secure authentication flow** using **access \u0026 refresh tokens**.\n- Propose a **gradual rollout strategy** to prevent breaking existing users.\n- Identify **potential risks** and how to mitigate them.\n\n📄 **File to edit:** `/solutions/security-strategy.md`\n\n---\n\n## 🎯 **Final Submission Notes**\n✔️ **Fork this repo** (DO NOT create a public PR).  \n✔️ **Implement solutions in the designated files.**  \n✔️ **Commit \u0026 push your work.**  \n✔️ **Share GitHub access with `@fliplet.com`.**  \n\n🚀 **Good luck!**\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliplet%2Ffliplet-engineering-manager-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffliplet%2Ffliplet-engineering-manager-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliplet%2Ffliplet-engineering-manager-test/lists"}