Skip to content

michaldziuba03/purly

Repository files navigation

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

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages