Giter Club home page Giter Club logo

angular-signup-form's Introduction

AngularSignupForm

Task

  • Build a single page app with a sign-up form.
  • The form should allow users to enter first name, last name, email, and password.
  • All fields are required.
  • Password validation:
    • Should be a minimum of eight characters,
    • Should contain lower and uppercase letters,
    • Should not contain user’s first or last name.
  • Email should be validated but there are various ways of accomplishing this. So, show us what you consider as a proper email validation.
  • The form should sequentially send GET and POST requests to https://demo-api.now.sh/users. The request body example:
{
    firstName: "Thomas",
    lastName: "Shelby",
    email: "[email protected]"
}

Implementation

Implemented accordingly with the specification.

Additional improvements implemented:

  • Unit Karma and end-to-end Playwright tests with 100% coverage
  • Email validation using regexp pattern
  • Bootstrap styling
  • Git pre-commit hook which runs tests and code quality checks / autocorrect: husky, lint-staged, eslint and prettier
  • Internationalization using i18next

Installation

Run npm install --force to install dependencies.

Force option used due to version incompatibility of the latest Angular 16 and angular-i18next.

Development server

Run npm start for a dev server.

You will be navigated to http://localhost:4200/

The application will automatically reload if you change any of the source files.

Build

Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.

Run tests

Run npm test to execute unit and end-to-end tests.

Run unit tests

Run npm run unit to execute the unit tests via Karma.

Run end-to-end tests

Run npm run e2e to execute the end-to-end tests via Playwright.

Make sure the development server is up and running.

Unit test coverage

Run npm run coverage to generate coverage report.

Run code quality checks

Run npm run lint for code quality checks.

Run npm run lintfix for code quality fixes. It happens automatically in pre-commit hook.

Update library versions

Run npm run update to update libraries to the latest versions.

angular-signup-form's People

Contributors

romaleev avatar

Watchers

 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.