Coder Social home page Coder Social logo

whtouche / ng2-auth0-starter Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 0.0 253 KB

Starter kit for Angular 2 applications using Auth0, webpack, and an Express server and MongoDB back end with full CRUD functionality

License: Do What The F*ck You Want To Public License

HTML 9.13% TypeScript 38.47% JavaScript 38.19% CSS 14.21%

ng2-auth0-starter's Introduction

Angular 2 Auth0 Express MongoDB CRUD Starter

This repo uses Angular 2 Beta 3.

Prerequisites

Before getting started you will need the following things:

  • MongoDB
  • Node.js / NPM
  • An Auth0 account (they're free)

I assume if you've found your way here you at least have the first two already taken care of.

Getting Started

Go to Auth0 and create a new application

The information you need can be found under the "Settings" tab after you create a new app - it will look like this:

Auth0 Screenshot

Add your Auth0 account information to the following files:

Auth0.json

  • secret = Client Secret
  • audience = Client ID

app.ts

  • On the "lock = new Auth0Lock" line, add your 'Client ID' and 'Domain'

Install the dependencies:

$ npm install

Compile the TypeScript into JavaScript and create the bundle:

$ npm run build

In separate terminal windows, run the mongo daemon, start the Express server, and start the webpack-dev-server:

$ mongod
$ npm run serve
$ npm start

Navigate to http://localhost:3000/

Contributing

Do you want to help? That would be great - this is still a work in progress. Check out the issues, there are definitely some things that I haven't figured out yet. Pull requests are welcome and encouraged.

Acknowledgements

This project owes a ton to Ajden Towfeek, please check out his YouTube channel for some of the best instructional videos on Angular 2 that I have found:

License

WTFPL

ng2-auth0-starter's People

Contributors

ajtowf avatar zyzle avatar

Stargazers

Test Account avatar  avatar Joshua Wiens avatar  avatar Gonçalo Rodrigues avatar Dylan Jew avatar Ben White avatar Dominik Ritter avatar Csaba Tamás avatar Martin Gontovnikas avatar

Watchers

James Cloos avatar Ben White avatar

ng2-auth0-starter's Issues

As a developer, I want this starter kit to have 100% test coverage

Maintaining 100% test coverage on your project can be more effort than it is worth, but since this is meant to be a starter kit I would love to start everyone off with 100% coverage.

Accomplishing this goal is going to require learning a lot more about testing Angular 2 than I currently know (see #2) - any help would be appreciated.

As a developer, I want to keep my components small by using external templates

If template strings had syntax highlighting and emmet support I would feel better about not using external templates (keeping everything together in javascript / typescript files, ala React) but ¯_(ツ)_/¯

Also, Angular CLI seems to favor the use of external template files, so it makes sense to fall in line behind the standard.

As a user, when creating a new todo, I want it to show up in the list without having to refresh the page

When creating a new todo, the new item is successfully posted to the database, but does not show up on the list until the page is refreshed.

Steps to reproduce:

  1. Navigate to the main page
  2. Type a new todo into the box and click "Add Todo" or hit enter

ER: The list is updated with the new todo
AR: The todo is successfully posted to the database, but the list is not updated until the page is refreshed.

As a user, I want to have access to full CRUD functionality

Currently the express / mongo back end has end points to support full crud functionality for todos, but the user can only create and delete todos through the UI. Full CRUD functionality is a high priority item for me to be able to consider this a "complete" starter kit.

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.