|
| 1 | +# CodeRev |
| 2 | + |
| 3 | +CodeRev is a lightweight tool to help you organize and conduct technical interviews using code reviews rather than leetcode. |
| 4 | + |
| 5 | +## Rationale |
| 6 | + |
| 7 | +In the age of StackOverflow and ChatGPT, is leetcode really the best way to evaluate technical candidates? |
| 8 | + |
| 9 | +*Was it ever?* |
| 10 | + |
| 11 | +Code review as interview has many benefits for any engineering team: |
| 12 | + |
| 13 | +* Understand how candidates interact with isolated parts of your codebase. |
| 14 | +* Better reflects day-to-day engineering responsibilities in your team. |
| 15 | +* Realistic representation of how a candidate thinks and communicates. |
| 16 | +* Open-ended and collaborative; no black and white responses. |
| 17 | + |
| 18 | +## How it works |
| 19 | + |
| 20 | +1. Create a workspace for each of the roles you're screening for. |
| 21 | +2. Upload and edit your source files that you'd like the candidates to review. |
| 22 | +3. Add candidates; each gets a separate view of the source to work on. |
| 23 | +4. Candidates review the code in their workspace and provide comments and feedback. |
| 24 | + |
| 25 | +## Benefits: |
| 26 | + |
| 27 | +Why use CodeRev? Why not just a GitHub repo? |
| 28 | + |
| 29 | +1. **Easy setup**: Lightweight, focused, and simple; just a few clicks to get started. |
| 30 | +2. **Isolated**: No exposure of your internal GitHub repos, accounts, and workspaces. |
| 31 | +3. **Collaborative**: Review candidate responses with your team and leave your own notes. (Coming soon) |
| 32 | +4. **Easy to compare**: See feedback from different candidates to the same code to compare. (Coming soon) |
| 33 | +5. **Define timed access**: Automatically release the workspace to your candidate and optionally revoke it. (Coming soon) |
| 34 | + |
| 35 | +## FAQ: |
| 36 | + |
| 37 | +* **Why did you make this tool?** I went through an interview where the process involved reviewing a snippet of code and really enjoyed the experience. I thought it would be great if there was a dedicated tool for this. |
| 38 | +* **What's the stack** Nuxt3 (Vue.js) + Quasar Framework + Google Cloud Firebase. Productive, fast, and more or less free. |
| 39 | + |
| 40 | +## Development |
| 41 | + |
| 42 | +Development can be done locally using the Firebase CLI emulators. |
| 43 | + |
| 44 | +1. Install the Firebase CLI tooling for your platform: https://firebase.google.com/docs/cli |
| 45 | +2. Make a copy of `web/env.template` as `web/.env` and add your Firebase config. |
| 46 | +3. Start the backend |
| 47 | +4. Start the frontend |
| 48 | + |
| 49 | +``` |
| 50 | +# Start the emulators in on console |
| 51 | +cd web |
| 52 | +yarn # Restore |
| 53 | +yarn dev |
| 54 | +
|
| 55 | +# Start the backend |
| 56 | +firebase emulators:start --only auth,firestore,functions,hosting,storage \ |
| 57 | + --import .data/firebase --export-on-exit |
| 58 | +``` |
| 59 | + |
| 60 | +## Deploying |
| 61 | + |
| 62 | +You'll need a Firebase project to deploy: |
| 63 | + |
| 64 | +``` |
| 65 | +# From web: |
| 66 | +yarn generate # This will generate the static routes. |
| 67 | +
|
| 68 | +# From the root: |
| 69 | +firebase deploy |
| 70 | +
|
| 71 | +# Deploy only the hosting (making a front-end change): |
| 72 | +firebase deploy --only hosting |
| 73 | +``` |
| 74 | + |
| 75 | +> 💡 Note: Functions isn't necessary; I started the project thinking I may need it, but you can ignore it and remove it. You won't be charged for it either way if you deploy it with functions. |
| 76 | +
|
| 77 | +## Using Functions Framework |
| 78 | + |
| 79 | +Functions framework allows the SSR backend to run on the server. However, this is currently not needed for CodeRev. |
| 80 | + |
| 81 | +To enable, swap the `hosting` configuration: |
| 82 | + |
| 83 | +```json |
| 84 | +"source": "web", |
| 85 | +"ignore": [ |
| 86 | + "firebase.json", |
| 87 | + "**/.*", |
| 88 | + "**/node_modules/**" |
| 89 | +], |
| 90 | +"frameworksBackend": { |
| 91 | + "region": "us-central1" |
| 92 | +} |
| 93 | +``` |
| 94 | + |
| 95 | +## Setting up CORS for Storage |
| 96 | + |
| 97 | +Storage requires that you set up CORS when using a custom domain. |
| 98 | + |
| 99 | +Create the bucket `source.coderev.app` and then follow this guide: https://cloud.google.com/storage/docs/using-cors |
| 100 | + |
| 101 | +Instead of doing it from the command line, you can use the Cloud Shell in console and open an editor in browser. |
| 102 | + |
| 103 | +Create a file `cors.json` |
| 104 | + |
| 105 | +```json |
| 106 | +[ |
| 107 | + { |
| 108 | + "origin": ["https://coderev.app"], |
| 109 | + "method": ["GET"], |
| 110 | + "responseHeader":[ |
| 111 | + "Access-Control-Allow-Origin" |
| 112 | + ], |
| 113 | + "maxAgeSeconds": 3600 |
| 114 | + } |
| 115 | +] |
| 116 | +``` |
| 117 | + |
| 118 | +From the console, run: |
| 119 | + |
| 120 | +``` |
| 121 | +gcloud storage buckets update gs://source.coderev.app --cors-file=cors.json |
| 122 | +``` |
| 123 | + |
| 124 | + |
| 125 | + |
0 commit comments