Coder Social home page Coder Social logo

hotquotes's Introduction

 Hot Quotes

License: GPL v3

Single page application based on React JS & Redux.
Displays randomly quotes from a pre-prepared storage. Each quote can be assigned the following data: author (one or several), tag (one or several), source.
Airtable database is currently used as storage, special server is planned in the future.

It is planned in the future to allow users to add their own quotes (public or for private use), create personal quotes collections, share quotes etc. More detailed development roadmap of the project can be found in our Wiki.

Table of content


Demo site

You can test working version of our site here https://legmo.github.io/hotquotes.

Technology stack


Screenshot

Web page screenshot


Getting Started

You will need Node.js to work with this project.

Start application
Download the project and run the following console commands in the local project folder:

  • npm i — download & install Node.js modules.
  • npm start — runs the app in development mode. Hot reload in browser (port:3000) included. Use «src» folder for making your edits.
  • npm run build — builds the app for production to the build folder «public».

Create Database
You will also need a backend-server with a database. Now I use the free zero-code service Airtable to work with the database. You can choose the solution you like.

Enter API key
Enter your API key to access the database into apiKey variable. If you use Airtable, then you need to register on the site Airtable and go to the Account page. The API key will be located in the config/const.ts file.

Application architecture

Full size picture on the miro.com

Application architecture

Contributing

If you have a desire to join the development — we will be happy to accept you into our team!
Details can be found in the Contributing section.
You can also ask the necessary questions in the Discussions section or send a private message to the developers.

Contact with developers





По-русски

Одностраничное веб-приложение на основе React JS & Redux.
Отображает случайную цитату из заранее подготовленного хранилища. Каждая цитата может сопровождаться следующими данными: один или несколько авторов, один или несколько тэгов, источник.
В качестве хранилища цитат используется база данных Airtable. В будущем планируется использование полноценного бэкенд-сервера.

Также планируются: разрешение пользователям на добавление собственных цитат (публичных или только для личного просмотра), создание персональных подборок цитат, возможность делиться цитатами и многое другое. Более подробный план развития проекта можно найти в Wiki.

Содержание


Демо-сайт

Вы можете протестировать рабочую версию сайта здесь https://legmo.github.io/hotquotes.

Технологии


Скриншот

Скриншот страницы


С чего начать?

Вам потребуется Node.js для работы с этим проектом.

Запуск
Скачайте репозиторий и выполните следующие консольные команды в папке локального проекта:

  • npm i — скачать и установить модули Node.js.
  • npm start — запустить приложение в режиме разработки. Поддерживается «горячая перезагрузка» в браузере (port:3000). Используйте папку «src» для ваших правок.
  • npm run build — собрать приложение в продакшен-режиме. См. папку «public».

Создание базы данных
Также вам понадобится backend-server с базой данных вашего приложения. Я использую бесплатный zero-code сервис Airtable. Вы можете выбрать решение которое вам нравится.

Добавление ключа API
Пропишите в переменную apiKey ваш API key для доступа к базе данных. Если вы используете Airtable, то вам надо зарегистрироваться на сайте Airtable и зайти на страницу Account. API key будет расположен в файле config/const.ts.

Архитектура приложения

Полноразмерное изображение на miro.com

Application architecture


Хочу помочь в разработке

Если вы хотите присоединиться к разработке — мы будем рады принять вас в команду!
Подробности можно найти в разделе Contributing.
Также вы можете задать вопросы в разделе Discussions или отправить личное сообщение разработчикам.

Контакты разработчиков

hotquotes's People

Contributors

legmo avatar

Stargazers

Anton L. Safin avatar  avatar  avatar

Watchers

 avatar

hotquotes's Issues

Sidebar filters setup

Sidebar filters setup — Category (tag), Author, Active filters.

  • In Sidebar, to the right of the author/category filter link name, show a counter number (how many quotes in the database are marked with this filter)
  • Filter on link click. Output new page — with filtered list of quotes, pager and quote counter at the page title.
  • Add a «Show All» link at the bottom of each Sidebar block. When clicked, an accordion block opens. In the block that opens, there is a list of all authors/tags. Vertical scrolling and heading letters like in an address book.

Main logic of filters works:

  • when clicking on a tag, its id is stored in the state section
  • the id array is formed from this section -> active filters are displayed in the side column from this array
  • from the same section, the same id array -> a request to the server is formed (parameters with a filter of these id are present in the request)

Links

SASS and PostCSS setup

SASS and PostCSS setup:

  • How to config PostCSS jn CreateReactApp? Create React APP - Post processing CSS
  • What modules should be used?
  • What modules are already installed (Create React APP)?
  • Set up automatic conversion px -> rem.
  • Where to use what: px / rem / em / ... ?
  • Check if the import of SASS variables into CSS files is configured correctly?
  • Prescribe the basic css rules of the site - font-size, etc. Check on the Skilld project.
  • Do I need to specify the base REM size?
  • Do I need to specify CSS-reset? Or is it implemented by PostCSS etc.?
  • Think about naming variables with font sizes. Check on the Skilld project.

Change request logic for «Refresh button» on «Quote card»

  1. Don't make a request to the server - just take a new random quote from local storage? Otherwise, we need to query the rest of the tables as well - Authors, Tags & Sources.
  2. At the same time, check that the same quote (by ID) does not come across.

Readme file update

Update the ReadMe file regularly:

  • Technology stack
  • Screenshot
  • English section

Add when needed:

  • Demo site link
  • List of developers

Migrate to TypeScript

Update linters settings

  • Setup key-spacing rule
  • Setup code formatting after Ctrl+S
  • Setup code formatting after console commands (lint-fix, build)
  • Automatic start linting & code formatting before git commit

Create first release & tags

Basic html layout fixes

  • Implement CSS Grid anywhere
  • Fix footer position
  • Fix block positioning in sidebar
  • Fix block positioning in <blockquote> footer
  • Move main variables to separate file

Create basic page layout

Create basic page layout

  • html head
  • <main>
    • use <figure><blockquote><figcaption><cite>
    • use :before for quotes symbols for old browsers
    • use text-indent CCS-property in <blockquote> for hanging punctuation quotes
    • use quotes css-property for <blockquote>
  • <aside>
    • use <section class="sidebar-authors"><h2 class="title-sidebar"></h2><ul class="list-sidebar list-authors"></ul></div> for authors list
    • use <section class="sidebar-tags"><h2 class="title-sidebar"></h2><ul class="list-sidebar list-tags"></ul></div> for tags list
  • <footer>

Blockquote example

<figure class="quote">
  <blockquote>
    But web browsers aren’t like web servers. If your back-end code is getting so big that it’s starting to run noticably slowly, you can throw more computing power at it by scaling up your server. That’s not an option on the front-end where you don’t really have one run-time environment—your end users have their own run-time environment with its own constraints around computing power and network connectivity.
  </blockquote>
  <figcaption>
    — Jeremy Keith, <cite>Mental models</cite>
  </figcaption>
</figure>   

Links

Repository initialization

  • Create a public repository.
  • Add GPL-3.0 license.
  • Enable support for Issues, Discussions & Wiki
  • Create this issue
  • Add a ReadMe with basic project info & badges.
  • Set up Projects (Kanban view)
  • Add basic labels
  • Create first milesone

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.