Coder Social home page Coder Social logo

clevertech / boilerplate Goto Github PK

View Code? Open in Web Editor NEW
113.0 113.0 41.0 6.05 MB

Clevertech boilerplate for projects based on Docker, Node.js and React

License: MIT License

JavaScript 77.58% Shell 2.25% HTML 0.67% Dockerfile 0.88% EJS 18.40% SCSS 0.22%

boilerplate's People

Contributors

aortizarteaga avatar ct-appcenter avatar diegoarcega avatar dorian599 avatar gausam avatar gimenete avatar gonrial avatar hijarian avatar hookkid avatar jjulianprin avatar keepitsimple avatar laurosn avatar mfornasa avatar vmurillo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boilerplate's Issues

ApAp Stack: Logout

  • route, view, link
  • remove JWT from whitelist
  • invalidate any nonces if present
  • expire any active cookies

Embrace ES Modules in the Backend

Hi!

I think it's a nice to have since thanks to esm we can now fully embrace ECMAScript imports/exports both in the frontend and in the backend. ๐Ÿ˜‰

I've done some initial work here that maybe can be reused, although more effort is needed.

@gimenete what are your thoughts on this? ๐Ÿ˜„

rpg-next: split babel out into separate chunk

module.exports = {
  webpack: (config, options) => {
    if (!options.isServer && !options.dev) {
      config.optimization.splitChunks.cacheGroups.babel = {
        chunks: 'all',
        name: 'babel',
        test: /[\\/]node_modules[\\/](@babel|regenerator-runtime)[\\/]/
      };
    }

    return config;
  }
);```

Integrate CleverAuth

Right now there's a fake authentication system. We should implement a react UI and backend using https://github.com/clevertech/CleverAuth/tree/master/core

Something like this:
https://github.com/clevertech/authentication-service
CleverAuth is a library extracted from that project โ˜๏ธ
Now we want to use the library in the boilerplate, but you can take a look to the authentication-service project to have an idea about the UI options, workflow and configuration settings.

ApAp Stack: Integration Tests

  • script to start jest-based integration tests
  • test integrations of login
  • test integrations of signup
  • test integrations of password reset
  • test integrations of email verification

ApAp Stack: Login

Using Passport.js and Redis:

  • authenticate a user's credentials against the local database
  • store a JWT in a redis whitelist with an expiration time on the entry

Pick token storage method:

  • Use a Same-Site HTTP-Only Secure __Host- prefixed cookies -- CSRF issues, needs nonce
  • use Authorization headers and localStorage -- XSS concerns but little to no CSRF issues

Change expected pattern for host names in frontend config

Right now we are expecting these host names to detect what configuration we need to apply:

// dev : dev-<random>.example.com

dev    :   dev-<random>.example.com
staging: stage-<random>.example.com

But the new patter should be:

dev    :   <whatever>-dev-<random>.example.com
staging: <whatever>-stage-<random>.example.com

So instead of getting the first word of the hostname, we need to pick the penultimate (arr[arr.length - 2]).

ApAp Stack: Password Reset

  • Similar to email verification
  • user enters an email address and clicks "reset password"
  • regardless of whether or not the email exists, the user should see "password reset email sent"
  • A password-reset link is emailed to the user in the same way email verification links are emailed (note: #51)

Apollo-Apollo Authn w/ Passport

I suggest passport due to the flexibility of being able to eventually support saml, oauth, openid, 2fa, fido u2f, and more.

Basic UI with minimal styling using the UI scaffolding

Get CBA Script AA Happy-path running

There's been lots of isolated unit testing and development happening on the steps and modules in the CBA script. The CBA script needs to be run and we need to fix all issues that prevent us from:

  1. npx start'ing the CBA script
  2. specifying we want apollo-apollo as our stack
  3. having apollo-apollo cloned down, configured, and starting

The above is the acceptance criteria. Generally, the modules lacking integration will be a significant barrier to having this work, and will need to be addressed piece by piece.

Add subtickets as necessary

ApAp Stack: New User Signup

  • Passport.js integration for local password auth
  • page where user can register for new account
  • email verification process
    - After registering, user is shown "thank you, check email"
    - any attempt to login with the account is shown the same message
    - clicking the link in the email will allow the user to login to the site
    - clicking the link will invalidate all verification links for the account
    - clicking the link will not log the user in automatically
    - after clicking the link, the user can login
    - links can only be used
    - all active links are invalidated once one link is used
    - links expire in an hour
    - clicking the link verifies the token
    - if the verification token is valid, the user sees "verified" and is redirected to the login page
    - if the token is not valid, the user is shown an "invalid token" page and redirected to the login page
    - if the token is not provided, this is treated like an invalid token.

Fix prompt object pattern

The correct pattern should be:

{
  baseDir: '...'
  base: {
     prompt: {
        ...
     }
   }
  stack: {
     prompt: {
        ...
     }
   }
  admin: {
     prompt: {
        ...
     }
   }

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.