Coder Social home page Coder Social logo

kguclu / full-stack-todo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wgd3/full-stack-todo

0.0 0.0 0.0 2.14 MB

An example repository showing how to create a full-stack to do application

Home Page: https://thefullstack.engineer/full-stack-development-series-an-introduction/

License: GNU General Public License v3.0

Shell 0.36% JavaScript 1.63% TypeScript 86.76% HTML 5.26% Dockerfile 1.14% SCSS 4.86%

full-stack-todo's Introduction

Full Stack To-Do

This repository contains the code base that corresponds to a series of blog posts on full stack development. Check it out here: Full Stack Development Series

MIT License Commitizen friendly Quality Gate Status codecov semantic-release styled with prettier

Features

Backend - server

  • NestJS 9
  • REST API with Swagger documentation
  • JWT authentication support
  • TypeORM for support of various database varieties

Frontend - client

  • Angular 16
  • User registration/login
  • Stateless UI
  • Storybook integration for component development
  • Custom Design Library
  • Modular State Management (toggled via InjectionTokens)

Testing

  • Jest for backend unit testing, and supertest for integration testing
  • Jest for Angular unit tests
  • Cypess + Storybook for UI integration Testing
  • > 90% code coverage

Other

  • Kubernetes manifests for cluster deployment
  • Dockerfiles for standalone and docker-compose support
  • GitHub Actions used for all testing, building, and releasing
  • Nx v16 monorepo used for clean directory structure and Nx Cloud for distributed CI tasks

Demo

As part of the Deployment Blog Post I added a small overview on deploying this application stack to Render. Both the UI and the REST API docs can be found here:

Application
Client https://fst-demo-client.onrender.com/
Server https://fst-demo-server.onrender.com/api/v1

Note Render's free tier spins down these application after they have idled for a while - it can take up to 30 seconds for the applications to spin back up!

Environment Variables

To run this project, you will need to copy the .env.sample file in the repository root, rename it .env and fill out the values accordingly:

Variable Description/Values
DATABASE_TYPE Passed to TypeORM, supports most major SQL-based databases
DATABASE_HOST Unneeded if using SQLite, can be used with remote databases or local Docker instances
DATABASE_PORT
DATABASE_USERNAME
DATABASE_PASSWORD
DATABASE_NAME
DATABASE_PATH Only used with SQLite for relative file path
JWT_SECRET String used to sign JWTs generated by the API
JWT_ACCESS_TOKEN_EXPIRES_IN Time in seconds that access tokens are valid

Run Locally

Clone the project

  git clone https://github.com/wgd3/full-stack-todo

Go to the project directory

  cd full-stack-todo

Install dependencies

  npm install

Set up environment file

  cp .env.sample .env

Start the server

  npx nx run-many --target=serve --all

Running Tests

To run tests, run the following command

  # for unit tests
  npx nx run-many --target=test --all --codeCoverage

  # for E2E tests
  npx nx run-many --target=e2e --all

full-stack-todo's People

Contributors

renovate[bot] avatar semantic-release-bot avatar wgd3 avatar

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.