Coder Social home page Coder Social logo

paperpod's Introduction

This project is currently inactive. If you're interested regardless, please reach out :).

Paperpod

Sponsors

Please consider sponsoring this project. This will allow me to give you perks in return for your kindness!

Assets

Developer's getting started

Setup

In addition to cloning the source code, you'll most likely want access to an

Afterwards, create a .env file containing:

ADMIN_USERNAME=<SOME_ADMIN_USERNAME>
ADMIN_PASSWORD=<SOME_ADMIN_PASSWORD>
GATEWAY_PORT=8080
API_PORT=8081
AUTHENTICATION_PORT=8082
AUTHENTICATION_INTERNAL_PORT=8083
WEB_PORT=8084
DOCS_PORT=8085
METABASE_PORT=8086
JWT_SECRET=<SOME_SECRET_STRING>
PGDATABASE=paperpod
PGPORT=5432
PGUSER=<SOME_USERNAME>
PGPASSWORD=<SOME_PASSWORD>
AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY>
AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
STRIPE_PUBLISHABLE_KEY=<STRIPE_PUBLISHABLE_KEY>
STRIPE_API_KEY=<STRIPE_API_KEY> # must have permissions to deal with payments and products
ULTRAHOOK_API_KEY=<ULTRAHOOK_API_KEY>
LOG_LEVEL=trace
# below only relevant for infra development:
STRIPE_COUPON_CODE=<STRIPE_COUPON_CODE>
DO_TOKEN=<DO_TOKEN>
GH_TOKEN=<GH_TOKEN>

Working with the code

This project relies heavily on Yarn Workspaces and Docker Compose. A basic understanding of how those work is recommended.

  • All commands are run from the root of the project
  • To run a yarn command (i.e. add a dependency) to a package, simply run yarn <PACKAGE> <COMMAND> <ARGUMENTS>, e.g. yarn mobile add lodash.
  • To boot and develop the web services, run docker compose up
  • To view logs from any service, use docker compose logs -f <SERVICE_NAME>, e.g. docker compose logs -f authentication.
  • To stop everything, run docker compose down

Finding documentation

The documentation is still a bit lacking, but most if it is available in this and other README.md files in this repository. Furthermore, API docs are available at paperpod.fm/docs.

Recommendations

The project structure is built with docker compose in mind. Docker Compose is great, but the commands can get long and tedious. My recommendation is to add these aliases to your environment, for an easier time:

alias du="docker compose up -d";
alias dp="docker compose ps";
alias dr="docker compose restart";
alias dd="docker compose down";
alias db="docker compose build";
alias de="docker compose exec";
alias dl="docker compose logs -f";

paperpod's People

Contributors

olaven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

paperpod's Issues

refresh medchanism for JWT-tokens

If the token expires (e.g. a user spends 15 minutes on the site), there's no way to get a new token.
In other words, the only way to use the page after token expiry is to refresh the page and log in again.

"*" pronounced litteraly

Tested in Norwegian and English.
"*" is pronounced "asterix". A possible solution would be to swap this for a longer pause somehow.

remove utils to accomodate the fact file paths in s3 are generated on the spot, and not somethng I have to generate

import querystring from "querystring"
import { models } from "../..";
export const getFilename = (article: models.Article) =>
querystring.escape(
article.owner_id + article.original_url
)
export const parseFilename = (filename: string, owner: models.User) => {
const unescaped = querystring.unescape(filename);
const [_, original_url] = unescaped.split(owner._id)
const [owner_id] = unescaped.split(original_url);
return {
original_url,
owner_id
}
}

Handle user resubscribe

A user that resubscribes should

  • have access as before
  • get shown a nice message in the day after resubscribing :)

Feature: PDF parsing

It should be possible to add PDF files.
This is a very common way of distributing text that
several people have requested.

This will prove especially useful for students or people reading a lot in their job,
where web articles are probably less common than outside of school/work.

Article properties should not be optional

Most article properties are optional right now.
This made some development easier, but it is not wize in the long run.
I think most of the properties on Article should be compulsory.

Where that cannot be guaranteed (e.g. converter functions), Partial<Article> should be
used instead of Article.

Landing page should be on subdomain

i.e. landingpage.paperpod.fm

This is the configuration when paperpod.fm was used. Presumably change @ with landingpage or similar to update.
Screenshot 2021-05-24 at 18 55 24

Port 80 should redirect to 443

The current setup only runs on port 443.
This breaks some links, defaulting to 80.

The server should listen on port 80 and redirect to 443 / Upgrade the connection.

Create full CI deployment with Terraform/Actions

Some groundwork has been done in #88.

  • figure out how to pass outputs from terraform to github actions
  • update the existing deploy-flow in such a way that it deployes the docker stack to a digitalocean droplet

Provide more information in Article

Suggestions:

  • Article duration
  • Image / other visual context (might be hard, perhaps favicon could be a decent substitute :D )
  • Category
  • Stream url

Test coverage on web

  • Add same test coverage tresholds to web as to other modules
  • Implement tests to pass that treshold

Board Test

Creating this issue to see if the Developmnt board catches it.

Research Spotify

Is it possible to add RSS to spotify?
/ paperpod? Alternatively, find another solution?

Handle user unsubscribe

  • Show a friendly message and point them to subscribe again :-)
  • Make sure they can't read from their feed. (return an audio message telling them how to resubscribe?)

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.