Giter Club home page Giter Club logo

rendall / simple-comment Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 3.0 3.07 MB

Simple Comment is a commenting platform for any website. Free, flexible, source-available, secure, private, and scalable.

Home Page: https://simple-comment.netlify.app

License: GNU Affero General Public License v3.0

TypeScript 61.30% JavaScript 20.79% Svelte 12.08% SCSS 2.01% HTML 2.85% CSS 0.97%
anonymous-posts anonymous-users authentication comment-system free free-tier identification mongodb nodejs typescript

simple-comment's People

Contributors

dependabot[bot] avatar rendall avatar

Stargazers

 avatar

Watchers

 avatar  avatar

simple-comment's Issues

Frontend testing with Cypress

Currently there are no frontend tests, so altering or creating new functionality is a crapshoot. Add cypress to the testing suite to drive TDD for frontend

Email notification

Right now if there is a comment by a user, the administrator does not receive a notification.

The administrator should receive a notification.

package.json does not exist error

https://simple-comment.netlify.app errors with the following:

{
  "errorType": "Error",
  "errorMessage": "package.json does not exist at /package.json",
  "trace": [
    "Error: package.json does not exist at /package.json",
    " at Object.t.find (/var/task/src/verify.js:3:443031)",
    " at Object. (/var/task/src/verify.js:135:333456)",
    " at Object. (/var/task/src/verify.js:135:336547)",
    " at r (/var/task/src/verify.js:1:158)",
    " at Object. (/var/task/src/verify.js:135:333068)",
    " at r (/var/task/src/verify.js:1:158)",
    " at Object. (/var/task/src/verify.js:135:78445)",
    " at r (/var/task/src/verify.js:1:158)",
    " at Object. (/var/task/src/verify.js:245:253032)",
    " at r (/var/task/src/verify.js:1:158)"
  ]
}

`login.html` does not exist

README instructions Upload the login.html page on the root of your website (or somewhere accessible). login.html exists nowhere. Either include login.html or remove the instruction.

Update project hierarchy

Currently each sub-project shares the same, project root directory for tsconfig and webpack. This creates conflicts.

For instance, vscode uses tsconfig.json to understand TypeScript highlighting, but Svelte and vanilla js and netlify.functions each use their own config file. This requires quite a bit of fiddling to get each to behave well during writing and building.

Break each project into its own sub directory, something roughly like:

├── svelte/
│   ├── tsconfig.json
│   ├── webpack.ts
│   ├── src/
│   ├──── main.ts
│   ├──── ...
├── shared/
│   ├── tsconfig.json
│   ├── webpack.ts
├── netlify.functions/
│   ├── tsconfig.json
│   ├── webpack.ts
├── project.json

IS_CROSS_SITE=production?

README instruction For IS_CROSS_SITE add the value production is confusing, as IS_ implies boolean. This should be changed to values true or false or the name should change to CROSS_SITE_MODE

`ALLOW_ORIGIN` key in .env update

ALLOW_ORIGIN in .env is confusing and needs fixes.

  1. Currently, policy.refererRestrictions set to false completely bypasses this check.
    • Enable wildcards in the ALLOW_ORIGIN value, so a value of https://o.net/blog/* would allow any page, e.g. ../blog/topic.html
    • Remove the policy flag entirely, and a simple * glob value would be effectively the same.
  2. ALLOW_ORIGIN is not intuitive.
    • It can hold multiple origins as a value, maybe ALLOW_ORIGINS, plural?
    • ORIGIN is not immediately clear. Maybe URL? Or something more intuitive?
    • ALLOW_something implies a boolean. Perhaps ALLOWED...?

Expired JWT still validate / verify

Two issues, here:

  1. The Cookie and the JWT expirations should correspond, but right now the Cookie expires in over 1000 years, and the JWT expires in 24 hours
  2. When the JWT is expired, the /user endpoint fails with a "User not authenticated" error.
  • The endpoint should issue a more detailed "User authentication expired" error message
  • The frontend should redirect to login

Add "All comments" page

Create a page that will show all comments across the simple-comment instance.

For now, no pagination, but this will be necessary in future.

Guest user cannot log in

Currently the guest user does not have access to the log in button, since it is hidden for all logged-in users, including guests.

Guest users should be able to log in.

Client framework

Currently the frontend client is a series of document.append calls. Update the client with a modern framework.

Guest user unable to submit comment

Two issues:

  1. When guest user submits comment, the new validation rule applies to password. Guest user will never be able to submit a comment, because guest users do not have passwords
  2. This fails silently with no notification

Creating new topic for guest fails with "unknown referer" error

When a new page is created, Simple Comment is supposed to allow the first visitor to create a topic if it follows a specific format. However, it fails with "unknown referer".

This requires a work-around of the admin creating these topics by hand in the database.

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.