All Projects → Skona27 → is-even

Skona27 / is-even

Licence: MIT license
SaaS platform for checking if number is even

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to is-even

blog-be-next
The back-end platform for Yancey blog.
Stars: ✭ 33 (-50%)
Mutual labels:  nestjs
nestjs-pg-notify
NestJS custom transport strategy for PostgreSQL Pub/Sub.
Stars: ✭ 53 (-19.7%)
Mutual labels:  nestjs
nestjs-rest-sample
NestJS RESTful APIs Sample
Stars: ✭ 204 (+209.09%)
Mutual labels:  nestjs
nestjs-dynamoose
Dynamoose module for Nest
Stars: ✭ 84 (+27.27%)
Mutual labels:  nestjs
nestjs-mercurius
NestJs module to use Mercurius as GraphQL server
Stars: ✭ 38 (-42.42%)
Mutual labels:  nestjs
nt-cms
nest.js with CMS
Stars: ✭ 61 (-7.58%)
Mutual labels:  nestjs
truthy
Open source headless CMS API written using NestJS, that has pre built modules like User Management, Role Management, Permission Management, Email Module, Account Settings, OTP, Throttling, RBAC support, Localization, and many more.
Stars: ✭ 200 (+203.03%)
Mutual labels:  nestjs
clock-in-out
A clock-in/out system using nestJS, PostgreSQL, TypeORM, Angular, Arduino, RxJS
Stars: ✭ 61 (-7.58%)
Mutual labels:  nestjs
nest-rabbit-tasks
nest-rabbit-worker is a TaskQueue based upon RabbitMQ for NestJS
Stars: ✭ 29 (-56.06%)
Mutual labels:  nestjs
game-store-monorepo-app
A full-stack web app built with NestJS and ReactJS that helps you find and discover over 500,000+ video games on your device. Powered by RAWG API.
Stars: ✭ 106 (+60.61%)
Mutual labels:  nestjs
nestjs-throttler-storage-redis
Redis storage provider for the nestjs-throttler package.
Stars: ✭ 56 (-15.15%)
Mutual labels:  nestjs
nestjs-rmq
A custom library for NestJS microservice. It allows you to use RabbitMQ or AMQP.
Stars: ✭ 182 (+175.76%)
Mutual labels:  nestjs
nestjs-otel
OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
Stars: ✭ 273 (+313.64%)
Mutual labels:  nestjs
crypto-watchdog
Crypto Watchdog is an open-source developer friendly project, periodically queries crypto market and notifies potential pumps & recently added tokens/coins via web-hooks.
Stars: ✭ 22 (-66.67%)
Mutual labels:  nestjs
nest-keycloak-connect
keycloak-nodejs-connect module for Nest
Stars: ✭ 174 (+163.64%)
Mutual labels:  nestjs
starter-reactnative-nestjs-mysql
Starter mobile ReactNative NestJS MySQL with continuous integration and AWS deployment
Stars: ✭ 16 (-75.76%)
Mutual labels:  nestjs
Nine-chat-frontend
采用socketio打造的多人实时通讯多房间在线音乐聊天室
Stars: ✭ 54 (-18.18%)
Mutual labels:  nestjs
nest-puppeteer
Puppeteer (Headless Chrome) provider for Nest.js
Stars: ✭ 68 (+3.03%)
Mutual labels:  nestjs
nestjs-i18n
The i18n module for nestjs.
Stars: ✭ 376 (+469.7%)
Mutual labels:  nestjs
react-ecommerce
E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
Stars: ✭ 136 (+106.06%)
Mutual labels:  nestjs

is-even

Backend CI Frontend CI

SaaS platform for checking if a number is even.

Check out Live version and API Documentation.

Why API is down?

I've decided to terminate the Backend application due to costs. AWS Infrastructure costs approximately $1.52 per day. The most significant share of these costs is generated by ALB (~40%), then RDS, and then EC2 instance. The frontend application works normally.

About project

This project is an example of a real-world production application. This project aims to show how one can implement a working system from start to end, deploy it and monitor it. Furthermore, it gathers some of the best practices of project development and maintenance. This project contains:

  • modern Frontend application written in Next.js
  • robust Backend application written in Nest.js
  • infrastructure as a code with AWS CDK
  • Typescript codebase for every application
  • docker environment for local development
  • monorepo manager to control all the and its dependencies
  • CI/CD pipelines for running tests and deployment

The project is maintained as a monorepo. Each application or library is kept as a separate package. Monorepo introduces the ability to reuse code and detect cross-stack bugs early.

This whole project is a SaaS boilerplate, ready to copy and use accordingly to your start-up idea! Feel free to fork it and adjust to your needs.

Prerequisites

The first step is to install node and npm globally on your machine.

You need to have docker and docker-compose installed on your computer to run the local environment. This project uses Rush.js as a monorepo manager. Check out the official Rush docs to set it up.

The backend application also uses AWS Cognito. Creating your user pool is unnecessary, but you will miss the core features like signup, login, or placing the orders.

Orders fulfillment depends on Stripe webhooks. For local development, you can use Stripe CLI to verify webhook calls. More on that on official stripe docs.

Run locally

To start the application locally, please follow the instruction specified below:

  1. Clone this repository
  2. Install dependencies with rush update
  3. Go into docker dir
  4. Set environment variables from template .env file
  5. Run rushx up for spinning up the docker environment

Frontend service will start on port 3000, and API service will start on port 4000.

Behind the scenes, rushx up command will spin up the docker containers. Hot reloading is enabled because those containers have their volumes linked to the source files inside packages.

If you want to rebuild your docker images and containers, use rushx build to remove your environment and build it from the start.

Documentation

The API documentation is autogenerated with Swagger. When running locally, it is available at http://localhost:4000/docs. Please check out the live version of the documentation: API documentation

Stack

Here are specified technologies that are used for this project, along with a short description of the production environment.

Frontend:

  • React
  • Next.js
  • XState
  • Chakra UI

Backend:

  • Nest.js
  • Typeorm
  • Postgresql
  • Typescript
  • Jest
  • AWS Cognito
  • Stripe

Infrastructure:

  • Docker (for the local environment)
  • AWS CDK

Other also important, but stack agnostic tools are:

  • Google Analytics,
  • Sentry

Frontend application is deployed on Vercel, which is one of the first choices for deploying the Next.js application. Backend application is deployed on AWS ElasticBeanstalk. API depends on some other services like:

  • AWS Cognito,
  • AWS RDS,
  • AWS S3

The DNS configurations are done via AWS Route 53, but they are not part of the infrastructure package.

Missing features

Here is the list of missing features or possible improvements. This is not a closed list. Feel free to add some other requirements.

  • Retry payment that was interrupted or failed
  • Delete API Keys
  • Prevent user from creating order if he still has the active credit
  • Enable subscriptions with Stripe
  • Split frontend to static landing page and dynamic Client application
  • Move reusable types to shared packages (this may break the local docker environment, packages would need to have access to each other during installation)
  • Integrate GraphCMS with Frontend
  • Add workflow for Backend and Infrastructure automatic deployments
  • Implement unit tests
  • TBD...

Contributing

Contributions make the open source community such a fantastic place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion to improve this, please fork the repo and create a pull request. You can also open an issue with the tag enhancement.

Commit types

Each commit must follow convention specified in conventional commit guidelines.

The shape of commit must be like:

<type>(<scope>): <subject>

// example
chore: update packages

Where scope is optional, but when used, it should match the package name e.g. backend or frontend.

While working on a feature, sometimes a situation may occur when it is more convenient to commit temporary changes for future rebase. To omit auto checking, command git commit must be called with -n or --no-verify flag.

git commit -nm 'WIP'

Release

This application uses Github Actions workflow for releases and generating changelog.

Each commit pushed to main branch triggers the workflow in which latest tag is generated. When tags are pushed to the main branch, another workflow is triggered, and as a result, a release is created. Release contains auto-generated changelog from commit history. Version bump to each package must be done manually when creating the specific tag.

The frontend application is deployed via Vercel on every release. Backend releases or Infrastructure updates are done manually from the CLI for now.

Help

In case of a problem with the local environment or application itself, please visit the issues to see possible solutions or open a new issue.

License

This project is licensed under the MIT License - see the LICENSE.md file for details. Feel free to use this project as the base for your next application.

Useful links

Here are specifies some useful links for administrating or monitoring the application.

Acknowledgments

Inspiration, code snippets, or useful articles:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].