Giter VIP home page Giter VIP logo

async-labs / builderbook Goto Github PK

View Code? Open in Web Editor NEW
3.7K 3.7K 882.0 6.28 MB

Open source web application to learn JS stack: React, Material-UI, Next.js, Node.js, Express.js, Mongoose, MongoDB database.

Home Page: https://builderbook.org

License: MIT License

JavaScript 99.42% CSS 0.58%
apis aws-ses boilerplate express-session expressjs github-api google-api javascript mailchimp material-ui mongodb mongoose nextjs nodejs passport react stripe

builderbook's People

Contributors

amirkx avatar athahersirnaik avatar batamar avatar delgermurun avatar greysdawn avatar helpse avatar jessebrack avatar johnking avatar johnmalcolm avatar klyburke avatar mohammadameer avatar nguyenda18 avatar paralax avatar rickhallett avatar tima101 avatar waterlesspiano2 avatar yurigor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

builderbook's Issues

close TOC on mobile

On mobile, when a user clicks any link in the Table of Contents (in sidebar of the read-chapter page) - the TOC should close, and the user should see the content of the section clicked

move marked.Renderer from page to server

Instead of running marked on every page load, let's save html content to DB in addition to markdown content

  • markdown content is used to compare content between database and Github
  • html content is used for data on the page

improve demo

create intro chapter to show scrolling and TOC in action

SubscribeForm component

Use SubscribeForm component to let readers subscribe to newsletters

Add Tutorial model and tutorials page

remove sanitize-html

@tima101 sanitize-html causes issues with displaying some content in books. Since users will write all code in books (and will not add anything unsafe), we can remove sanitize-html.

Add data to main admin page

Decide which data to move to pages/admin/index.js
Decide if need pages/admin/book-detail.js

Data:

  • book details, sync button, edit button
  • book sales stats: sold count and free book count

UI improvements

  • decrease font weight of header tags
  • change colors of section names in table of contents
  • add chapter order, in addition to chapter title, in title tag

Add google and github callback's to Readme

We could add the following info to the README, in order to configure Google and Github apps:

Google auth callback:
[host]/oauth2callback

Github auth callback:
[host]/auth/github/callback

add `noPrefetch` prop to `MenuDrop` component

Set prefetch to false for the /logout route in the MenuDrop component

Otherwise, we get a browser console error like this:
GET https://demo.builderbook.org/_next/c3fa3d01-d44e-4ae4-88c9-0f836d00d8c2/page/logout.js net::ERR_ABORTED

add boilerplate app

Boilerplate app should have:

  • React, Next.js, Material-UI
  • Express, Express Session
  • connected to MongoDB with Mongoose
  • Google OAuth 2.0

Can't set headers after they are sent.

Below error is not always reproducible and not crucial (app runs):

most recent: vercel/next.js@7b2cd84#diff-bec864430eb5752a683c8798d0c6bd6c
old: vercel/next.js@c210a2e

vercel/next.js#2152
vercel/next.js#3778

{ Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:390:13)
    at SendStream.send (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:618:10)
    at onstat (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:730:10)
    at FSReqWrap.oncomplete (fs.js:153:5) expose: false, statusCode: 500, status: 500 }

Add title to pages

please add title to AddBook and EditBook pages using Head from next/head

no need for description since pages are not indexed

TOC highlight disappears past h4 heading

When you scroll past content under an

heading, the current section (which is under

heading) on the TOC becomes un-highlighted.

We want the section to remain highlighted when reading any content within that section.

Example with relational database

This is just a suggestion, but it would be nice to have an example of how Builder Book can be made with a relational database like SQL instead of using MongoDB, Mongoose, etc.

when adding a new book, sync with Github on save event

When you add a new book and click the Save button on the /admin/add-book page - sync the book with its Github repo and redirect to the /admin/book-detail page.

This way the admin does not need to click Sync with Github for book creation, only for book updates.

Failed to load css file from module

Hi,

Im trying to add 'react-big-calendar' to your boilerplate project, but getting the following error:

Module parse failed: C:\source\repos\KvutzatYavne\node_modules\react-big-calendar\lib\css\react-big-calendar.css Unexpected token (1:0) You may need an appropriate loader to handle this file type. | .rbc-btn { | color: inherit; | font: inherit;

maybe adding webpack will solve this issue

Chapter 7: returnSidebar and returnSection

In the beginning of chapter 7, the book goes over how to build the returnSection() function. However, that function is already built in 7-start. Furthermore, the book begins discussing how to build returnSidebar. However, 7-start already has code for returnSidebar() that appears to be fully built out. This makes it very confusing to follow, since I'm not sure what code I should be writing.

Deploying with babel-node

Hi Kelly and Timur,

Question about the user of babel-node to start the server on Now. I was reading the babel docs which states the babel-node should not be used in production (link). What's the benefit of doing so in Chapter 8? Is it just to make the deploy process easier? What would the alternative be?

Btw, just finished the final chapter. Good stuff, thank you!

Snapshots of important pages

Add snapshots to readme:

  • Public user on read-chapter.js page,
  • Customer user on read-chapter.js page,
  • Admin user add-book.js page,
  • Admin user book-detail.js page

What else?

Missing Avatar and headersAlreadySent error w/3-end and 4-start

After copying my .env into book/4-start and running yarn then yarn dev, I get the following error after logging in with Google:

    at SendStream.headersAlreadySent (/Users/earl/dev/builderbook/book/4-start/node_modules/send/index.js:390:13)
    at SendStream.send (/Users/earl/dev/builderbook/book/4-start/node_modules/send/index.js:618:10)
    at onstat (/Users/earl/dev/builderbook/book/4-start/node_modules/send/index.js:730:10)
    at FSReqWrap.oncomplete (fs.js:171:5) expose: false, statusCode: 500, status: 500 }

Furthermore, the app looks like this when logged in:

image

The user I am logged in with does have an avatar.

editable text next to Buy Button

Create a new entry field on the add-book.js and edit-book.js pages so that an Admin user can add text next to the Buy Button for a book. For example, the text could be "On sale" or "Pre-order ends on Friday", etc.

Fix logic on bookmark

Instead of requiring the user to select a chapter section to create a bookmark, let's have the user bookmark the section he/she is currently reading

  • when a user is within a chapter section, the bookmark button should say Bookmark "section"
  • after creating a bookmark in a chapter, the button should have options to Go to "section" or Bookmark "current section"

Example with TypeScript

This is just a suggestion, but it would be nice to have an example of how one could use TypeScript instead of PropTypes and Babel for Builder Book given the rising popularity of and support for TypeScript.

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.