Giter Club home page Giter Club logo

askagram's Introduction

Askagram

Askagram Live

Askagram is a full-stack web application designed and built by Maddie Revill, inspired by the functionality of Quora, but with a twist. While Askagram's users pose questions to the community, much like Quora, all answers must come in the form of pictures.

The backend is implemented in Ruby on Rails using a PostgreSQL database. The frontend utilizes ReactJS and Redux framework, taking advantage of React's virtual DOM to update the interface smoothly and efficiently during user navigation. The user interface is inspired partly by Instagram. All styling for Askagram was written from scratch using Sass (SCSS syntax.)

Key Features

User Signup and Authentication

Users can log in and sign up for an account, or use a demo login to easily check out the site. Passwords are hashed using BCrypt on the backend and session tokens are held in the database for comparison the token held in a site visitor's session cookie

auth

Question index

The question index page is "home" for logged-in users, and contains a listing of all questions available for answering. Answered and unanswered questions are fetched from the backend in JSON format, held in the application store and separated on the frontend using a selector function. Answered questions are ordered by the most recent answer submission (as determined by the backend using ActiveRecord), and each is displayed with a carousel element implemented with [react-slick][slick]. [slick]: https://github.com/akiran/react-slick

question index

Question Detail

The question detail view displays all of the answers to a question, a like button and like count for each answer and a button to access the answer upload form. question detail

Answer submission

Answer submission is done using a custom-built upload widget that sends photos -- uploaded from a computer or from an external URL -- via the Cloudinary API for storage and retrieval. A subsequent call to the Askagram API saves the answer record to the database.

export const createAnswer = (file, questionId) => dispatch =>
(
  AnswerAPIUtil.sendToCloudinary(file).then(
    cloudResponse => AnswerAPIUtil.createAnswer(cloudResponse.url, questionId),
    cloudErr => dispatch(receiveUploadErrors([_uploadErrorMsg]))).then(
    response => dispatch(receiveAnswer(response),
    err => dispatch(receiveUploadErrors(err.responseJSON))))
);

answer upload

Search

Askagram's search bar is supported by the pg-search gem, which extends the functionality of ActiveRecord to harness the power of PostgreSQL's text search. Each keystroke in the search bar results in an API call to the QuestionsController and a re-rendering of the search results component to reflect changes in the results.

search

Features in development

The core functionality and interface of Askagram was designed and built in two weeks, and each day the list of features for future development has grown longer.

Search/Question add integration

Quora avoids duplicate question submissions by combining its search bar and "Ask question" forms into one. As Askagram's database is populated, it could benefit from the same functionality.

Photo taking

Plans are in place to utitlize the WebRTC web API to allow direct photo submission from a user's webcam.

User profiles

User profiles will include a user profile photo, bio, and a collection of liked questions and answers.

Expanded answer features

  • Captions
  • Comments
  • Pagination/infinite scroll

askagram's People

Contributors

madrev avatar

Stargazers

 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.