Giter VIP home page Giter VIP logo

peppermint-lab / peppermint Goto Github PK

View Code? Open in Web Editor NEW
1.6K 25.0 164.0 89.59 MB

An open source ticket management & help desk solution. A zendesk/freshdesk alternative

Home Page: https://peppermint.sh

License: Other

JavaScript 22.89% Dockerfile 0.16% CSS 0.11% TypeScript 75.59% MDX 1.26%
self-hosted docker javascript nodejs full-stack ticketing-system ticket-management react customer-relationship-management crm

peppermint's People

Contributors

2406mmartin avatar alexandermalmstrom avatar aottr avatar bobthepogbuilder avatar chmac avatar deduplicate avatar dependabot[bot] avatar dieideeistgut avatar hmorris3293 avatar jesperwallberg avatar jodfie avatar kirari04 avatar mac-chaffee avatar mark-pitblado avatar misly16 avatar moonlight567 avatar nervus86 avatar pabrodez avatar potts99 avatar rubenhoenle avatar sahmed007 avatar xcassanello avatar zhedar 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

peppermint's Issues

In app user feedback system

System similar to feedback fish to allow users to send feedback / issues rather than have to post on discord or github. Potentially open source the solution

One click install

hey šŸ‘‹

this looks like a super cool project and I would really love to try it out. I'm looking to install it on a Raspberry Pi, but I'm not quite sure how to do that. would it be possible for you to create some kind of install script or something that would allow me to get this setup?

ARM support

Hi,

Is it known if this will run on ARM devices? And if they are unsupported, would it be possible for either an ARM version or for some advice on how I could port it to ARM?

Appreciate you taking the time to make this!

Issues & recommendations from DBTECH

Issues:
file upload issue
File upload refetch file list api when ticket is uploaded
Add admin default to read me

Ideas:
Ticket row clickable
Ticket drop down to have open ticket page and completed page
Spinners to loading of data on fetch
More user types?
More ticket status types

Error when creating new user

Replication steps:

  1. Login to the admin account and go to the dashboard
  2. Click on users at the bottom left
  3. Click new user to create a new user
  4. Type in any user information and press save
  5. Observe error in docker console.

Screenshots:

image

Testing

Start to work on unit tests & e2e testing to get some automated tests rolling

Reduce docker file image size

Currently the uncompressed size of the image is 2.74GB
Compressed is 992.58 MB

65% decrease

Need to look into trying to reduce this size

Website SSL issue

Hey folks.

An issue with your website's SSl cert is making your website inaccessbile. Also, when you visit the plain http version there's a 404 with the following message

"Code: DEPLOYMENT_NOT_FOUND ID: lhr1::8p4pc-1635892770606-bfaadd4fbaed
www.peppermint.sh might be available. Click here to learn how to assign it to a project."

FYI

Show updated date in 'History'

In the 'History' tab, it might be beneficial to display a 'Last Updated' date for each row on this page to show when the ticket information has been updated.

Code Standards

Hi @potts99, I chanced upon this repository from the Explore page. I wanted to know if anything was open for me (and any others who found this) to contribute. For example, I can see that there's a TypeScript migration in the works. I also wanted to throw my two cents towards support for linting and testing, as the current one seems to lack unit tests, and the coding style seems slightly inconsistent between files and sometimes between lines in the same file.

Also, there seem to be a few places with pretty high code duplication, like some files in the controller and middleware directories. For example, maybe this might be a more concise way of implementing the middleware/authCheck.js (though I haven't tested to make sure it works the same). Let me know if that's something you'd want me to pursue.

const jwt = require("jsonwebtoken");
const { prisma } = require("../../prisma/prisma");

const status = {
  NOT_LOGGED_IN: {
    code: 401,
    message: "You must be logged in",
  },
  NOT_AUTHENTICATED: {
    code: 401,
    message: "You must be authenticated",
  },
  FORBIDDEN: {
    code: 403,
    message: "Forbidden",
  },
  ERROR: {
    code: 500,
    message: "There was an error processing your request",
  },
};

/**
 * Utility function to authenticate and authorize user.
 * When can this throw a 500 ERROR?
 * 
 * @param {*} req the initial request
 * @param {boolean} checkIfAdmin set to true if we are attempting to authorize the user.
 * @returns {string} the status of the request.
 */
const getUser = async (req, checkIfAdmin = false) => {
  const { token } = req.cookies;
  if (!token) {
    throw new Error('NOT_LOGGED_IN');
  }

  jwt.verify(token, process.env.JWT_SECRET, async (err, payload) => {
    if (err) {
      console.log(err);
      const message = checkIfAdmin ? 'NOT_AUTHENTICATED' : 'NOT_LOGGED_IN';
      throw new Error(message);
    }
    const { id } = payload;
    const user = await prisma.user.findUnique({
      where: {
        id,
      },
    });

    if (checkIfAdmin && !user.isAdmin) {
      throw new Error('FORBIDDEN');
    }

    return user;
  });
}

/**
 * Check to make sure the request is coming from a valid user.
 */
exports.isAuth = (req, res, next) => {
  try {
    const user = await getUser(req);
    req.user = user;
    next();
  }
  catch (err) {
    console.log(err);
    const { code, message } = status[err.message];
    return res.status(code).json({ message });
  }
}

/**
 * Check to make sure the request is coming from a user whose role is ADMIN.
 */
exports.isAdmin = (req, res, next) => {
  try {
    const user = getUser(req, true);
    req.user = user;
    next();
  }
  catch (err) {
    console.log(err);
    const { code, message } = status[err.message];
    return res.status(code).json({ message });
  }
}

Navigation error

Clicking on this button: https://i.imgur.com/EvFKX19.png causes issues. When you click it, it becomes the active link meaning even if you are on the home page it says that is the active link when all that does is take you to pmint.dev

Going to the route path causes issues

When I go to https://demo.pmint.dev it redirects me to /Login which then redirects me to /login which causes a nightmare for browser navigation log

Invalid login causes redirect to main page and does't display error message

Click on Log in button always leads to redirect and newer displays error:

<Button
  ...
  onClick={() => {
    onSubmit();
    setTimeout(() => history.push("/"), 1000);
  }}
>

A better way is to block login button while request is sending and then redirect user or display error without refreshing and don't clean values in form. Antd buttons have loading attribute that looks good for this goal.

can't create, delete or modify client

peppermint | PrismaClientValidationError: Argument id: Got invalid value NaN on prisma.updateOneClient. Provided Float, expected Int.
peppermint | Argument number: Got invalid value 12345678 on prisma.updateOneClient. Provided Int, expected String or NullableStringFieldUpdateOperationsInput or Null.
peppermint |
peppermint | at Document.validate (/usr/src/app/node_modules/@prisma/client/runtime/index.js:32546:19)
peppermint | at NewPrismaClient._executeRequest (/usr/src/app/node_modules/@prisma/client/runtime/index.js:34652:17)
peppermint | at consumer (/usr/src/app/node_modules/@prisma/client/runtime/index.js:34597:23)
peppermint | at /usr/src/app/node_modules/@prisma/client/runtime/index.js:34599:47
peppermint | at AsyncResource.runInAsyncScope (async_hooks.js:197:9)
peppermint | at NewPrismaClient._request (/usr/src/app/node_modules/@prisma/client/runtime/index.js:34599:25)
peppermint | at Object.then (/usr/src/app/node_modules/@prisma/client/runtime/index.js:34707:39)
peppermint | at runMicrotasks ()
peppermint | at processTicksAndRejections (internal/process/task_queues.js:95:5) {
peppermint | clientVersion: '2.25.0'
peppermint | }

Notification system

Add a global notification component to allow for api results to error or send a successful message

Queue support

As a good ticket system we need different queues for different teams.
It should also be possible that the tickets will be create in the queue based on the receiver (see also #78)

[Request] Update port numbers in various document locations

[SOLVED??]

After posting, I thought to modify the docker-compose file's base URL value from http://localhost to http://localhost:5000. This seemed to do the trick and the application is now correctly loading. I checked the documentation and noticed the discrepancy: the Getting Started page on the docs.peppermint.sh website does not include the port number in the compose file. This must have been where I copied it from.

I also noticed the docker-compose files in the actual repository all have different port numbers:

  • The README mentions port 5000
  • docker-compose.dev.yml mentions port 5001
  • docker-compose.staging mentions port 8000
  • docker-compose.yml mentions port 5001

Is there any reason they aren't all consistent? Perhaps this is a lack of understanding on my part, but I hope my experience accurately captures the kinds of questions a new user may face.

Original post below

Hi all,

I've heard a lot about this project from the /r/selfhosted Reddit page, so I wanted to give it a try.

I'm currently trying to run it from my Linux Mint 20.04 desktop and am receiving the following errors after attempting to login with the provided default credentials:

image

Just to rule out any issues on my local machine, I followed the same process to install on my server machine, which has multiple other services running on it without issues. The server is running Ubuntu Server 21.10. In both instance, the result is the same as shown in the screenshot above, and the docker logs contain the following messages immediately after loading the main page:

[next-auth][error][CLIENT_FETCH_ERROR] 
https://next-auth.js.org/errors#client_fetch_error request to http://localhost/api/auth/csrf failed, reason: connect ECONNREFUSED 127.0.0.1:80 {
  error: {
    message: 'request to http://localhost/api/auth/csrf failed, reason: connect ECONNREFUSED 127.0.0.1:80',
    stack: 'FetchError: request to http://localhost/api/auth/csrf failed, reason: connect ECONNREFUSED 127.0.0.1:80\n' +
      '    at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1461:11)\n' +
      '    at ClientRequest.emit (events.js:400:28)\n' +
      '    at Socket.socketErrorListener (_http_client.js:475:9)\n' +
      '    at Socket.emit (events.js:400:28)\n' +
      '    at emitErrorNT (internal/streams/destroy.js:106:8)\n' +
      '    at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n' +
      '    at processTicksAndRejections (internal/process/task_queues.js:82:21)',
    name: 'FetchError'
  },
  path: 'csrf',
  header: {
    host: '192.168.1.196:5000',
    connection: 'keep-alive',
    'upgrade-insecure-requests': '1',
    'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36',
    accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
    'sec-gpc': '1',
    referer: 'http://192.168.1.196:5000/',
    'accept-encoding': 'gzip, deflate',
    'accept-language': 'en-US,en;q=0.9',
    cookie: 'next-auth.csrf-token=90da3b9b4598ad84915c78e066c3e80d58097b04627ce8010b39159a9a06703e%7C22b35255cc213368fd8569b04233e1473909018618a734ec290ef39e981acf88; next-auth.callback-url=http%3A%2F%2Flocalhost'
  },
  message: 'request to http://localhost/api/auth/csrf failed, reason: connect ECONNREFUSED 127.0.0.1:80'
}
undefined

One interesting thing to note is that even with it running on a remote machine, it still is trying to redirect after logging in to localhost, which obviously wouldn't work. I feel confident that I do not have any other services running that are using the same ports:

kadar@shadowserve:~/snap/docker/peppermint$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      754/systemd-resolve 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      896/sshd: /usr/sbin 
tcp6       0      0 :::22                   :::*                    LISTEN      896/sshd: /usr/sbin 
udp        0      0 127.0.0.53:53           0.0.0.0:*                           754/systemd-resolve 
kadar@shadowserve:~/snap/docker/peppermint$ dps
CONTAINER ID   IMAGE                          COMMAND                  CREATED         STATUS         PORTS                                                 NAMES
1bc559d02c8c   pepperlabs/peppermint:latest   "docker-entrypoint.sā€¦"   5 minutes ago   Up 3 seconds   0.0.0.0:5000->5000/tcp, :::5000->5000/tcp, 5001/tcp   peppermint
e62691081585   postgres:latest                "docker-entrypoint.sā€¦"   5 minutes ago   Up 5 minutes   5432/tcp                                              postgres

Attempting to login using default credentials results in the screenshot above. Appreciate any help in troubleshooting and resolving this, and happy to provide more information, thanks!

Add ability to set a base URL for client

Currently the application only supports being run on the bare domain, i.e. https://website.com.

If you proxy the application into a subdir, for example https://website.com/ticketing, the application does not work, the resources will point to the bare domain.

This can be solved by creating an environment arg for the BASE_URL like many applications do, which will pre-append the subdir onto any other URL.

Unable to modify user

I attempted to rename the default user by editing it and turning it into my user, but none of the changes would stick. I then made a new user for myself (and misspelled my name in the process). When I attempted to edit my new user, none of the changes I submitted saved for that user either.

I initially suspected that perhaps the logged in user couldn't change their account, but perhaps there's something wrong with the edit functionality entirely.

Transfering Tickets to different Engineers not working

Hello,

fist up - thanks for all this work! I really welcome the simplicity which gets rid of all the stuff we don't need or want (惄)

So i've spun up an installation today using Docker (Docker-Compose) with a nginx-proxy in front of it (jwilder/nginx-proxy). Everything seemed nice on the first tests here. Creation of users, clients and tickets is working nicely as expected.

I am not able to change the engineers/asignees on any Tickets. I checked development-env, logs & browserconsole but could not get my hands on any useful logging or error.

Is this a mistake on my side (which i assume (惄) )? Thanks!

API error handling linking to notification system

Alongside the notification system being built which gives users a better indication of api's failing / succeeding -> all api routes need to be updated to following the same sort of system which reliably tells the front end if the event was a success or failure

User experience feels off when clicking 'Tickets' in the navigation bar

The 'Home', 'History', and 'Admin' links in the navigation bar take you to some page when clicked on them. The 'Tickets' link has a drop down which causes the navigation flow to feel a bit off. Perhaps it would be better to also make the 'Tickets' link clickable so that when clicked, it can take you to the 'Open Tickets' by default.

Reverse proxy base url

Allow us to set the port in the base url. I have mine sitting behind reverse proxy and I end up at baseurl:5020 when the reverse proxy handles the the 80>5020 transversal.

Change ticket priority

Currently there is no way to change the priority of a ticket. This is a very useful feature as the initial ticket creator may mischaracterize it. This becomes even more useful when you implement ticket creation by non-logged in individuals.

Basic Email notifications support

Add support to sending when certain jobs are completed

  • Ticket Creation / Ticket completion
  • Client Creation
  • User Creation / User password reset from log in page / user password updated by admin

Editor to allow for custom layout to be added to email

Global State

Create a global state to seamlessly share data across components

SSO support (OIDC, SAML, LDAP)

Hello from Reddit! I'm just putting an official request here that can be actioned upon. I'd love to see SSO of some form (OIDC, SAML, or LDAP, namely) implemented in this project. Most teams who are using ticketing platforms will not wish to rely on the internal authentication of Peppermint for security and convenience reasons.

Log in issue in dev mode

Hi,

I've cloned the repo and started the dev mode. When I try to log in using [email protected] and 1234 as user-password, I get this error on console:
POST http://localhost:5000/api/v1/auth/login [HTTP/1.1 422 Unprocessable Entity 5ms]

This is my example.env file:
NODE_ENV=development PORT=5000 MONGO_URI_DEV=mongodb://127.0.0.1:27017/ MONGO_URI_DOCKER= JWT_SECRET=""

Unfortunately, I'm not entirely sure what I've done wrong. Do you know where could I start taking a look? Thanks.

Basic webhook support

Add the ability to add webhooks when tickets related actions are completed such as

  • Create a ticket
  • Ticket status changes

custom 404 page

Create a custom 404 page rather than use the default nextjs page

Reverse proxy for subdirectory as well as for subdomain

Hi,

I tried installing Peppermint with the docker-compose file provided behind my Apache reverse proxy (the url looks like: https://www.mywebsite.fr/peppermint), but as I understand in the documentation, the reverse proxy works only for subdomain configurations, not subdirectories ?
When I install it then I get the following in the browser:
https://user-images.githubusercontent.com/25644865/156941506-85f8f687-9d8b-4f51-a76c-646cc67850d0.mov

Is there a (simple) way to get it work for subdirectories as well ?

Thank you for your work !

Panel states version

Somewhere in the UI of the panel it should say whether or not the panel is the latest version, this will allow system administrators to update the panel.

(Inspired by pterodactyl):

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.