GithubHelp home page GithubHelp logo

michaldziuba03 / purly Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 2.15 MB

SaaS platform for managing your brand links. Shorten links, generate QR codes, track traffic and more ๐Ÿ”— ๐Ÿ“Š

License: MIT License

JavaScript 0.91% TypeScript 98.10% Shell 0.04% Handlebars 0.40% CSS 0.55%
url-shortener shortener shorten-urls typescript nodejs bitly tinyurl redis postgresql saas

purly's Introduction

purly โœ‚

SaaS platform for managing your brand links. Under active development. Primary goal of this project is to create sample that does more than just simple CRUD.

Frontend is still in very early stage of development. It lacks proper error handling and will receive major upgrade when core features will be done.

links-page

team-page

qr-code-preview

Currently only downloading as PNG is possible. In the future SVG and JPEG will be added.

Account settings interactions example

launchpad-links

launchpad-appearance

Link in Bio feature. More features to come after major refactor.

Tech stack

Advanced concepts used in app

  • Asynchronous messaging (with BullMQ)
  • Caching
  • Rate-limiting
  • Error monitoring (with Sentry)

Features

  • Email Verification
  • Social Authentication (Google, GitHub)
  • Email & Password Authentication
  • Reset Password flow
  • Google Recaptcha support
  • Paid monthly subscriptions (Stripe)
  • URL shortening
  • QR Codes generation
  • Reporting malicious URLs
  • UTM Generator
  • Mobile Redirects
  • Link Redirect Expiration
  • Statistics for shortened URLs
  • Health checks
  • Link in bio
  • Custom domains
  • Workspaces with members management

Todo

  • write e2e tests (currently partially written for user, workspace and auth modules)
  • create CI pipeline

Development

Project uses Nx workspaces for building and handling monorepo structure.

Run databases and services

cd docker
docker compose up

Run setup scripts

# will install depedencies and create .env file
npm run setup
# run migrations (will run migrations against database defined in env.POSTGRES_URI)
npm run db:migrate
# run migrations for stats database (definied CLICKHOUSE_ env variables)
npm run stats:migrate

Configure S3 with MiniO (optional)

Purly uses MinIO to simulate AWS S3 for local development. We suggest to use AWS CLI for initial configuration.

Read about S3 local setup in /tools/s3-local/README.md

Run applications (api, worker and frontend web app)

npm run serve

Forward Stripe webhook locally

Purly uses STRIPE_WEBHOOK_PATH variable for webhook URL obfuscation. Don't forget to replace it in production with your own random value.

stripe login # only once - stripe will remember your session
stripe listen --forward-to localhost:8000/api/stripe/webhook/e7a42abb5d31ec92bdfeec3cb0a4fa1b

Stripe CLI will give you webhook signing secret like whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Save this value in .env as STRIPE_WEBHOOK_SECRET and restart API. CLI gives you the same secret so no need to repeat this step every time you run listen command.

Contributing

Currently project is in early stage of development and many things are changing so often. Keep it in mind if you want to contribute.

  1. Use conventional commits for commits and PRs.
  2. If you want to introduce bigger change I recommend to create issue first with feature request and get approval from mantainer :) Otherwise your pull request can be declined and you will waste your time.
  3. After changes in table schemas, run db:generate script to generate migrations and run db:migrate to run migration.

License

Distributed under the MIT License. See LICENSE for more information.

Contributors

contributors

purly's People

Contributors

michaldziuba03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

blkluv

purly's Issues

Mistakes to fix...

  • lack of testing (unit tests, e2e)
  • lack of typings in some cases
  • poor auth system
  • poor code quality in general
  • eslint rules are not respected
  • zookeeper is probably still managed incorrectly

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.