Giter VIP home page Giter VIP logo

sfburrito's Introduction

Who has the best Mission burrito?

Just a simple webapp where people can vote for what they think is the best taqueria that serves Mission burritos in San Francisco.

This website is accessible at whohasthebestmissionburrito.com. A screenshot of the website is shown below.

Screenshot of whohasthebestmissionburrito.com

Why?

I've gotten in countless debates with friends and non-friends arguing about which taqueria is the best. I got frustrated. So here it is.

That said, I also wanted to create the webapp just to see how fast I can develop it. I did most of the work in two or three days. This also gives me a template to build more similar (simple) webapps in the future.

Tech stack

The old implementation is just a classic MERN stack (MongoDB, Express, React, Node) with TailwindCSS as my front-end framework. The current implementation is just a serverless website deployed on Netlify and Supabase (no server). Code for the server is still in this repo, but the front-end doesn't call it anymore.

Deployment for MERN

IMPORTANT: This is deprecated, as the server isn't used anymore in favor of a serverless implementation. To deploy on MERN, see commit 647c661.

I followed this post to deploy my MERN stack online. I also did the following:

  • In default.conf, inside the server block, I added:
location /api/ {
    proxy_pass http://localhost:5000/api/;
}
  • I whitelisted the IP address of the server in MongoDB Atlas.

If stopping/restarting the AWS instance, don't forget to:

  • Update the IP address in the DNS
  • Run pm2 update to restart the service
  • Whitelist the new IP address in MongoDB

If testing on your local machine, remember to add the ATLAS_URI environment variable to config.env. Note that this should include the database name too in case your database name isn't the default value test. This should look like:

mongodb+srv://<username>:<password>@cluster0.vbaw8.mongodb.net/<database_name>?retryWrites=true&w=majority

Serverless deployment

In a nutshell, create a table in a custom schema called private and implement SECURITY DEFINER functions in the public schema to access this table. This is to practice schema isolation. See supabase.md for more information.

Contact

Email me at [email protected]!

sfburrito's People

Contributors

edhyah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.