Giter Site home page Giter Site logo

lucymk / what-the-fac-is-for-dinner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fac-12/what-the-fac-is-for-dinner

1.0 1.0 0.0 252 KB

A web app to help us plan our community dinner!

Home Page: https://what-the-fac.herokuapp.com

HTML 12.86% JavaScript 68.73% CSS 13.76% PLpgSQL 4.66%

what-the-fac-is-for-dinner's Introduction

What-the-FAC-is-for-dinner

@jamiecoe "Nobody's gonna bring a slab of meat."

Or are they? With this useful planner, we'll be able to find out.

A community meal planning application

WHY?

This week our challenge was to create a web app which fulfiled the following criteria:

  • Simple web app with a node server and a database
  • Includes a schema for the database
  • Guards against script injection and other security concerns
  • Includes dynamic content

WHAT?

As our community dinner is approaching, we decided to make a web app which allowed each member of our community to input which dish they are bringing to the dinner, and any dietary requirements for that dish.

HOW?

We started by creating a schema, which contained 4 tables of users, dishes, dietary requirements, and the connnections between the dishes and the dietary requirements. This allowed us to visualise how the tables would interact.

Our software architecture identified that we needed a couple of different bespoke routes through the server. We decided on a'Get Dishes’ route which would run every time the page loaded to display all dishes and their makers on the page, and an ‘Add Dishes’ route which would run every time the submit button was pressed. Our stretch goal was to be able to filter the dishes by different criteria.

We hosted our database on heroku, and also created a test database to allow us to do database testing using tape and shot.

Lessons Learned

  • We practised using databases, and setting these up on Heroku by using environment variables.
  • We had an issue when we were initially returning data from the get dishes function. Within our SELECT statement, we were selecting 3 columns which had the same name, although from different tables. This meant that each new column was overwriting the previous one. We therefore had to give the columns different aliases to ensure this did not happen and that we could return all the results.

what-the-fac-is-for-dinner's People

Contributors

lucymk avatar jamiecoe avatar rb50 avatar carolineapp avatar

Stargazers

Tunde avatar

Watchers

James Cloos 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.