Giter Club home page Giter Club logo

crs_test's Introduction

RuviClass API

🚂🚋🚋🚋🚋🚋
Fun functional programming
A classroom response system (CRS) for your institution.

An innovative software for education and learning. Built with ❤︎ by Cristian Flores and Contributors

Table of Contents

Overview

This is a REST API in Node.js using ES6 and Express. Intended for use with Postgres using node-postgres.

📦 Requirements & Installation

npm install
node serve.js
npm run dev

🎨 Features

Package Feature Sumary
bcrypt-nodejs -- Used to hash user's password before saving it into the DB.
colors -- --
cors -- --
express-validator API parameter validation Validate body, params, query, headers and cookies of a request (via middleware) and return a response with errors; if any of the configured validation rules fail. You won't anymore need to make your route handler dirty with such validations.
jsonwebtoken Authentication Used to generate and verify authentication tokens.
moment -- --
nodemon Auto server restart Restart the server in real-time anytime an edit is made.
pg -- --
socket.io -- --
-- Code linting --
uuid -- --
VSCode Extension Description
.editorconfig It helps developers define and maintain consistent coding styles between different editors and IDEs.

📙 Documentation

💬 FAQ

Why is it called RuviClass?

Because I thought it sounded cute. All these programs talk about being "performant", "rigid", "robust" - I like programming to be light, fun and non-scary. Choo embraces that.

🚀 Used by

Who uses SDVersion

📚 See Also

🤝 Contributing

We love contributions! Check out the Contribution Guide for more information.

🎁 Support

Creating a quality framework takes a lot of time. Unlike others frameworks, RuviClass is completely independently funded. We fight for our users. This does mean however that we also have to spend time working contracts to pay the bills. This is where you can help: by chipping in you can ensure more time is spent improving RuviClass rather than dealing with distractions.

Backers

Become a backer, and buy us a coffee (or perhaps lunch?) every month or so. Become a backer Thank you to all our backers! 🙏

Sponsors

Become a sponsor and help ensure the development of independent quality software. You can help us keep the lights on, bellies full and work days sharp and focused on improving the state of the web. Become a sponsor

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

❤️ Acknowledgments

Thanks to:

🎓 License

Usage is provided under the MIT© License.

Consultas

SELECT m.name, c.id_class, c.id_module, c.description, c.status, c.date, c.created_at, c.updated_at
FROM modules AS m
INNER JOIN (
  SELECT id_class, id_module, description, status, date, created_at, updated_at 
  FROM classes
  WHERE id_module IN( 
    SELECT id_module 
    FROM modules 
    WHERE id_course = 2
  )
) AS c
ON m.id_module = c.id_module;

Personalizar los logs: https://github.com/pinojs/pino?fbclid=IwAR0YlQK9TC183FdLcIDIE7XpzIZhtHS8H27uTUp5uInDgJ_JdfXAQsUVz6E

Implementar un console.table personalizado: https://codereview.stackexchange.com/questions/157402/implementing-console-table-in-javascript https://stackoverflow.com/questions/17224130/formatting-text-with-tabs-or-spaces/17252151

Bug1: Inicio de sesión con sesión en el localstorage

En Firefox funciona bien pero en chrome envia login al socket pero hace reedireccionamiento al login siendo que la sesion existe.

¿Quien hace el reedireccionamiento? Los this.router.navigate(['/login']); ...

Si recargo la página recién iniciada la sesión si funciona. Ejemplo: http://localhost:4200/admin

Si cierro chrome y vuelvo a entrar a la url: http://localhost:4200/admin también funciona.

¿En alguna parte se verificará la expiración del token? Esto se verifica siempre desde el servidor. Para verificar en el cliente sería necesario el SEED pero por razones de seguridad no se recomienda.

Bug 2:

Prueba de usuarios: profesor: [email protected] admin

estudiante1: [email protected] 1234

estudiante2: [email protected] 1234

Bug3: Crear un file log con métodos

const PAD_START = 10

function logInfo(message: string){
  console.log(`${colors.cyan.bold('[SOCKET]'.padStart(PAD_START))} ${message}`);
}

function logSocket(message: string){
  console.log(`${colors.cyan.bold('[SOCKET]'.padStart(PAD_START))} ${message}`);
}

function logConnect(message: string){
  console.log(`${colors.cyan.bold('[SOCKET]'.padStart(PAD_START))} ${message}`);
}

Bug4: Login con sesión iniciada

Si me voy al login teniendo una sesión iniciada, realizar la reedirección al dashboard correspondiente.

Bug5: Socket LoggedIn Emitido

Cuando me voy al dashboard y el token esta vencido realiza el reedireccionamiento al login pero de igual manera emite el evento socket...

Bug6: Cuando inicio clase sale 2 notificaciones

crs_test's People

Contributors

floxcristian avatar

Watchers

 avatar  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.