GithubHelp home page GithubHelp logo

cms_noticias's Introduction

CMS Noticias

Setup

Install all dependencies and run the server with

npm install && npm run start_dev

Then duplicate .env-template.js inside the config directory, rename it to .env and add necessary credentials. Since the .env file is excluded from git, no passwords will be leaked to github.

To transpile ES6 to vanilla JS and create the frontend-bundle with webpack run:

npm run build

Development

Please enable the editorconfig plugin within your IDE and try to obey as many es-lint rules as possible.

Deploy

The app has been released to Heroku @ https://agile-wave-55174.herokuapp.com.

The MongoDB-instance is hosted at mlab.com.

Ask for permission to deploy.

REST API

Users Methods

login

  • method: POST
  • path: /api/users/login
  • parameters: email, password

signup

  • method: post
  • path: /api/users/signup
  • parameters: password, token

logout

  • method: get
  • path: /api/users/logout
  • parameters: none

forgotPassword

  • method: post
  • path: /api/users/forgotPassword
  • parameters: email

toggleUserState

  • method: delete
  • path: /api/users/${userId}
  • parameters: none

createNewUser

  • method: post
  • path: /api/users/create
  • parameters: username, email

getAll (users)

  • method: get
  • path: /api/users/
  • parameters: none

updateAssignedPages

  • method: patch
  • path: /api/users/${userId}
  • parameters: assignedPages

fetchAssignedPageIds

  • method: get
  • path: /api/users/${userId}/assignedPages
  • parameters: none

fetchAssignedPages

  • method: get
  • path: /api/users/${userId}/assignedPages
  • parameters: none

getUserInfoForToken

  • method: get
  • path: /api/users/userfortoken/${token}
  • parameters: none

Pages Methods

getAll(pages)

  • method: get
  • path: /api/paginas/
  • parameters: none

persistOne(pages)

  • method: post
  • path: /api/paginas/
  • parameters: name

persistNewPoll

  • method: post
  • path: /api/paginas/${pageId}/poll
  • parameters: pageId, poll

getPoll

  • method: get
  • path: /api/paginas/${pageId}/poll
  • parameters: pageId

votePoll

  • method: put
  • path: /api/paginas/${pageId}/poll
  • parameters: pageId, optionId

Notices Methods

getAllForOnePage

  • method: get
  • path: /api/paginas/${pageId}/notices
  • parameters: pageId

getOneById

  • method: get
  • path: /api/paginas/${pageId}/notices/${noticesId}
  • parameters: pageId, noticesId

getAllForOneUser

  • method: get
  • path: /api/notices?userId=${userId}
  • parameters: userId

persistOne(notices)

  • method: post
  • path: /api/paginas/${pageId}/notices
  • parameters: pageId, noticiaObject

updateOne

  • method: put
  • path: /api/notices/${noticiaObject._id}/
  • parameters: noticiaObject

getAllComments

  • method: get
  • path: /api/notices/${noticeId}/comments
  • parameters:noticeId

persistComment

  • method: post
  • path: /api/notices/${noticeId}/comments
  • parameters: noticeId, data

Team

cms_noticias's People

Contributors

luislacker avatar mateodaza avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar JoaoRacedo avatar

cms_noticias's Issues

secure api

with authorization and authentication

Implement user management

Two sorts of users should be taken care for:

  • admins
  • editors

This also includes the frontend implementation of Login, Sign in and Forgot password page.

Share noticias

We need to enable the user to share news-articles

E.g.:

  • Twitter
  • Facebook

page crashes on reload, if not homepage

This issue is related to client and server routing.
Serving all requests with index.html on the server didn't work, since all resources (.css, .js) will be ignored...

Research ability to send mails

We need a way to send mails. (User authentication, password-forget)...

Find a npm-package or some sort of SMTP-Server to get the job done.

Nodemailer might be a good start.

Limit pages an editor can post to

Only let an editor post to pages he had been assigned to before by an admin.
This concludes showing the limited subset of pages in the select box in Dashboard - Edicion

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.