Move API keys to a backend
Create a backend to proxy API requests between the client and Airtable
Short-term solution:
- Move Airtable calls to Netlify unbundled lambda functions as a proxy server so we won't expose the API key on requests
Long-term solution (will create follow-up tickets for this):
- Pick a tech-stack, implement and host a proper backend server
- Migrate database from Airtable to a proper db and access from the backend server
Privacy reasons: We want to protect our database and limit access to sensitive columns such as user contact information. Related #13
Migration checklist
- [x] Location requests
- Fetch on
views/FindSpeaker.vue - Fetch on
components/LocationInput.vue
- Fetch on
- [x] Topics requests:
- Fetch on
views/FindSpeaker.vue - Fetch on
components/TopicsInput.vue
- Fetch on
- [x] Languages requests:
- Fetch on
views/FindSpeaker.vue - Fetch on
components/LanguageInput.vue
- Fetch on
- [ ] Speakers requests:
- [ ] Fetch on
views/FindSpeaker.vue - [ ] Create on
components/NominateForm.vue
- [ ] Fetch on
Would love to get help on this one, but please sync up with @tuttiq and myself first.
I think the MVP for this might be a node function, hosted on Netlify functions feature. Just a wrapper to send requests to Airtable using the API key.
On a more long term solution, I was thinking about migrating from Airtable to a proper backend + database.
I could work on the side to spin up a quick Ruby on Rails server with a basic API and migrate the data from Airtable to MySQL or Postgres. This can be done easily with Rails scaffolding and hosted for free on Heroku.
Let me know any thoughts!
Oooh, might be cool to have it all inside Netlify for simplicity. I was watching some of casidoo's tweets on some fancy features inside Netlify. Heroku is great too. Up to you.