Giter Club home page Giter Club logo

week4-case's Introduction

Want to solve a mystery? ๐Ÿง

Week 4 - CASE

How to install

  • Download files
  • cd to the main folder
  • npm install to install the modules cited in package.json file

Technical criteria ๐Ÿฆน

  • Express server โœ”๏ธ
  • Modular codebase โœ”๏ธ
  • PostgreSQL database โœ”๏ธ
  • Hosted on Heroku โœ”๏ธ
  • One of the spike topics โœ”๏ธ
    • upload files
  • Validate user-submitted data
  • Handle errors and inform the user โœ”๏ธ
  • Styled appropriately

User stories ๐Ÿ•ต๏ธโ€โ™€๏ธ

As a user, I want:

  • Create an account before uploading a picture
  • Receive a message if something on my registration goes wrong
  • Access the page with all the pictures uploaded to the application
  • Click on a picture
  • Come back later and see my picture is still there

Acceptance criteria โœ”

  • Sign-up / Log-in forms
  • Add picture form only available to logged in users
  • Page showing all pictures
  • Individual page for each picture
  • Semantic HTML
  • PostgreSQL database hosted on Heroku
  • Secret environment variables

Future Improvements ๐Ÿ”ฉ

  • Improve CSS for all pages
  • Tests for all routes
  • Individual page for each user
  • Flash messages
  • GitHub actions CI
  • More testing with Cypress

Schema ๐Ÿฅ

What we learnt ๐Ÿ“š ๐Ÿค“

  • How to upload local files to a database using multer
  • Creating effective schemas to handle the information
  • Authorizing access to users
  • Session management (with cookies)
  • Working with async code to solve database race conditions.
  • Deploy to Heroku and configure environment variables there
  • Using console and Heroku logs to debug

Bugs ๐Ÿž ๐Ÿชฒ

  • In home page, we first placed the following line outside the if...else statement:
response.send(layoutHTML('Home', homeHtml));

As a result the home page was not rendering even when the user was successfully logged in.

๐Ÿ’ก To solve this: We moved this line once in the if statement and once in the else.

week4-case's People

Contributors

elenamarinaki avatar aaadriana avatar cerealenjoyer 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.