Code Monkey home page Code Monkey logo

answeroverflow's People

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

answeroverflow's Issues

Add License File

Update all packages & root repository to have a license file to allow people to use this project

Footer

What is this for?

website

Feature

As a user, I need to be able to quickly access all the relevant links from the footer

Ideal solution or implementation

Footer links:

Contact
FAQ
Getting Started
Discord Link
Twitter Link
GitHub Link
Terms of Service
Privacy Policy

Alternative solutions or implementations

No response

Other context

image

Finish API

What is this for?

core

Feature

Finish the API

Ideal solution or implementation

  • Clean interface for validating permissions
  • User Server Settings
  • Server Settings
  • API Router
  • Bot Router

Users

It's possible for a user to be created in 3 ways, tests must be in place to support all methods of creation

  • Creating a user from indexing their message on Discord (Makes account but not user)
  • Creating a user from signing in on the website (Makes user then account)
  • A user signs in for the first time on the website who has already been seen indexed (Account is made already then user)

Alternative solutions or implementations

No response

Other context

No response

Search Result Page (/search)

What is this for?

website

Feature

As a user, I want to be able to search and evaluate results from all communities on Answer Overflow to find the answers I'm looking for.

Ideal solution or implementation

A search bar that takes you to a results page. The results page needs to have information such as:

  • Replies

  • Views

  • Is Solved?
  • Community

Alternative solutions or implementations

No response

Other context

View the existing search as a reference:

https://www.answeroverflow.com/search?q=How+do+I+turn+on+these+new+settings+for+my+help+channels%3F

Reload On Bot Package Change

Currently, the only time the Discord bot reloads is when you save a change in one of the files directly on the bot package. It may be possible to make it reload on change with some changes to the tsup config and this'd help improve developer productivity

Read The Rules Consent

Is your feature request related to a problem? Please describe.
As a server owner, I want to increase the number of users consenting by having a way to have users consent without having to see the Answer Overflow prompt, while keeping them informed of what consenting means

Describe the solution you'd like
In the rules screening, the server consent prompt should be visible for community members to read and agree to

  • This server utilizes Answer Overflow to publicly display help channel content on the web. By posting in this server, you are providing consent to publicly display your messages in order to help others find answers.

Describe alternatives you've considered

  • Some communities use custom screening channels instead of Discord's membership screening, this may also be worth supporting

Additional context

image

Test Utils Package

Collection of utility functions and constants for testing Answer Overflow

Refactor Discord Bot Tests

  • Move event dispatch into a wrapped function that dispatches the event with a delay, delay should be customizable
  • Make object cloning a utility test function
  • Make calling the api in a test use a custom caller, call as super user, throw errors
  • Make the default api call have no authentication
  • Make the bot api call it's own caller

[Web (/settings/servers)] Sever Selection Menu

What is this for?

website

Feature

As a server owner, I want to be able to quickly manage the servers I have Answer Overflow set up in

Ideal solution or implementation

Prettier version of

image

Alternative solutions or implementations

No response

Other context

No response

Website Hompage (/)

What is this for?

website

Feature

As a user visiting Answer Overflow, I need a landing page that allows me to understand what features Answer Overflow offers and try it out

Ideal solution or implementation

A homepage with the following elements:

Search Bar - Trial search
Example Search Button - Example for users who are new and don't know what query to use
Example Result Button - Highlights a good result (could be replaced with a random result button)
Communities on Answer Overflow - Demo real world use cases
Feature Overview

Alternative solutions or implementations

No response

Other context

Visit https://www.answeroverflow.com/ to see the existing landing page

Manage Channel Settings Menu (/channel_settings)

Is your feature request related to a problem? Please describe.
As a user, I want to be able to manage channel settings directly on Discord

Describe the solution you'd like
An easy to use menu that allows me to configure:

[Enable/Disable] Enable Indexing
[Enable/Disable] Mark Solution
[Enable/Disable] Mark Solution Instructions

Text Channel Only:
[Enable/Disable] Auto Thread
[Action] Send Consent Prompt

Forum Only:
[Enable/Disable] Read The Rules Consent Via Forum Post Guidelines
[Select] Select Forum Tag

Along with that, providing a links to:

  • Web Dashboard
  • Longer Settings Explanations
  • Support Discord Server

Additional context

Endpoints needed:

Indexing Utils:

  • Set indexing enabled
  • Set forum post guidelines consent enabled
  • Forum channel only
  • Needs consent prompt in guidelines

Help Channel Utils:

  • Set mark solution enabled
  • Set send mark solution instructions in new threads enabled
  • Set solved label
  • Forum channel only
  • Set auto thread enabled
  • Text/Announcement channel only

Misc:

  • Documentation link
  • Support link
  • Send consent prompt

Reference of the existing /settings command
image

[web /settings/[server_id]] Server Dashboard

What is this for?

website

Feature

As a server owner, I want to get information about my server from the website

Ideal solution or implementation

Managing settings from the web dashboard is being removed, the web dashboard will be read only

The dashboard will display information such as the configured settings, the number of indexed messages, and the invite url

Along with that clicking on a channel will show analytics for that channel

image

Alternative solutions or implementations

No response

Other context

No response

Validate env vars for Discord Bot

What is this for?

bot

Feature

As a developer, I want warnings and errors when my environment variables are set incorrectly

Ideal solution or implementation

Errors being thrown when environment variables are not set

Alternative solutions or implementations

No response

Other context

No response

Hot Reload Reacord

Theoretically it may be possible to listen to the HMR event from Sapphire HMR and get a forked version of Reacord to update all existing message views

Manage Account Menu (/manage_account)

Is your feature request related to a problem? Please describe.
As a user, I want to be able to manage my account directly on Discord so I don't have to log into Answer Overflow to manage my account information

Describe the solution you'd like
I'd like to see a slash command menu that provides settings to a user with the following options:

[Enable/Disable] Indexing Of Messages In Server
[Enable/Disable] Publicly Displaying Messages
[Enable/Disable] Globally Ignore Account (deleting / undeleting account)

Describe alternatives you've considered

  • Only having the manage account menu on Answer Overflow
  • Using slash commands instead of a button menu

Additional context

The existing bot has a /manage_account command which can be used as a reference:

image

Discord Events Parity

What is this for?

bot

Feature

As a user, when I edit/delete/update my message/thread/channel on Discord I'd like that to be reflected on Answer Overflow

Ideal solution or implementation

Listening to the raw events emitted by Discord JS and updating the relevant content respectively. In the future this should be batched for performance

Alternative solutions or implementations

Possibly allow server owners to delete a channel while storing that content on Answer Overflow

Other context

No response

Discord Statuses

What is this for?

bot

Feature

As a developer of Answer Overflow, I want statuses in the bot profile to encourage users to visit the bot.

Ideal solution or implementation

The ability to cycle through an array of statuses, possible ideas are:

100% Open Source!
Answering X questions
Indexing X channels
Helping X servers
X answered questions!

Alternative solutions or implementations

No response

Other context

No response

Open Everything On Launch

When you run yarn dev it should launch the following for you:

  • web
  • storybook
  • prisma studio

Possibly also add a dev:quiet command that doesn't automatically launch these

Message Result Page (/m/[id])

What is this for?

website

Feature

As a user, I want an easy to view message page that allows me to quickly find the solution to my problem

Ideal solution or implementation

Porting the existing message page, demo https://www.answeroverflow.com/m/1034242084493856788

  • Have messages load from the id in the url
  • Display server invite for server & channel
  • Only display public messages
  • Highlight Root Message
  • Highlight Solution Message
  • Light mode support
  • Dark mode support
  • Search bar should contain query that lead to the page

image

Alternative solutions or implementations

No response

Other context

No response

Continuous Deployment

Setup a CD pipeline to deploy a staging version of the website and Discord bot based off the latest version of the main branch to ensure changes work in production

Header

What is this for?

website

Feature

As a user, I want a header that can allow me to navigate and see status

Ideal solution or implementation

Answer Overflow [ ] Sign In / Profile Picture

Alternative solutions or implementations

No response

Other context

image
image

Sync User Delete

What is this for?

bot

Feature

As a user, when I delete my Discord account I expect my messages to deleted from Answer Ovreflow

Ideal solution or implementation

Listen to the on guild user delete event and then fetch that user to see if it throws a not found exception, if so then this user has been deleted (possibly fetch after a delay?)

Alternative solutions or implementations

Hope Discord implements an 'on user delete' event

Other context

No response

Mark Solution Application Command

Is your feature request related to a problem? Please describe.
As a user, I want to be able to mark my question as solved to help others find the solution message and to make it easier to know what needs attention

Describe the solution you'd like

A message command that runs on the solution message and replies to that message with the root message ID and the solution message ID. This is to preserve that data incase it needs to be resolved in the future. This can only run in threads.

Additional context

image

image

Split Discord JS Mock Into It's Own Package

What is this for?

bot

Feature

As a developer, I want to reuse DiscordJS mock in other projects and so it needs to have it's own package

Ideal solution or implementation

A separate package in the monorepo with only DiscordJS as a dependency

Alternative solutions or implementations

No response

Other context

No response

Rework API Permissions

What is this for?

core

Feature

As a developer, I want an easy way to reuse permissions across routes by asserting information. This includes examples such as:

Ideal solution or implementation

  • Ensuring user id matches the user id of content they are editing
  • Allowing overrides of permissions from the Discord bot and super users
  • Allow mutations of output on procedures depending on what content the view is allowed to see. i.e all people can fetch a user, but only that user can view their email
  • Check against permissions of server owners

Alternative solutions or implementations

No response

Other context

No response

Message Component First Iteration

What is this for?

website

Feature

As a user of Answer Overflow, I would like to see indexed messages in a readable flexible format

Ideal solution or implementation

The message component is a driver for a lot of interactions on Answer Overflow. To give an example of some use cases:

  • Search Results
  • Message Result Pages
  • Recent Questions Tab

Along with that, it needs to support the following items:

  • Images
  • Markdown
  • Code blocks (With syntax highlighting & a copy button)
  • Tags?

To allow for flexibility in it's implementation, the message should be a base component that takes in other components that make up other interactions. For example, the

Alternative solutions or implementations

No response

Other context

Message Page:

image

image

image

Community Page

image

Send Consent Message

Is your feature request related to a problem? Please describe.
As a server owner, I need a way to get consent in bulk from existing users

Describe the solution you'd like
A message with a consent prompt and a button to provide consent through

Describe alternatives you've considered

  • A slash command

Additional context

The owner of AnswerOverflow has added the AnswerOverflow bot to their server to index their help channel messages.

Questions and answers sent in Discord channels are stuck in the server that they are sent in. AnswerOverflow makes questions sent in help channels searchable on the internet to make answers more accessible.

By contributing your messages from help channels, you can help people who have similar questions as you solve their problems

image

Automatically Send Mark Solution Instructions

Is your feature request related to a problem? Please describe.
As a user, I do not know how to mark a question as solved therefore I need some sort of instruction on how to do this

Describe the solution you'd like
When a thread is created, send an instruction message

Describe alternatives you've considered

  • Prompting on keywords such as 'thanks' and 'solved'

Additional context

  • to help others find answers, you can mark your question as solved via Right Click Solution Message->Apps->โœ… Mark Solution

image

Consider absolute paths with aliases

import { publicProcedure, router, mergeRouters } from "../../trpc";

this can get out of hand quickly and make the code hard to read

# confusing
import foo from '../../../../../../hell.ts'

consider adding an ESLint rule to prevent these
https://eslint.org/docs/latest/rules/no-restricted-imports

...
'no-restricted-imports': [
      'error',
      {
        patterns: ['../..*'],
      },
    ],
...

after which we would get

# nice and readable
import foo from '@/path/to/hell.ts'

Auto Thread

Is your feature request related to a problem? Please describe.
As a server owner, I want basic threading incase I want to use a text channel instead of a forum channel

Describe the solution you'd like
On a new message in a channel, create a thread with the name of the author and a part of the original message

  • On message, if auto thread is enabled create a thread on that message
  • Title the thread in this format "{authorNameInServer} - {cleanedMessageContnet}" with a max length of 47, if its greater than 47, add a ... to the end
  • Don't create new threads for system messages, bot messages, only create them for human messages

Describe alternatives you've considered

  • Encouraging people to use forum channels instead

Clean Monorepo

With the core components of the monorepo in place, before serious development starts it'd be good to go through each package and ensure they are all setup properly with correct:

  • Configure strict TSConfig setup to be shared on all packages
  • ESLint running on all packages
  • Lint script all packages
  • Fix peer dependency warnings

Message Indexing

Is your feature request related to a problem? Please describe.
As Answer Overflow, we want to index messages to display them on the website

Describe the solution you'd like
On a set interval, message indexing occurs from the last indexed message to the most recent message.

Community Page (c/[id])

What is this for?

website

Feature

As a user, I want a way to search all the questions in a server and see what questions a community has

Ideal solution or implementation

image

Alternative solutions or implementations

No response

Other context

No response

Contact Page (/contact)

What is this for?

bot

Feature

As a person visiting the site I need a way to get in contact

Ideal solution or implementation

Email, link to Discord, link to schedule time on my calendar

Alternative solutions or implementations

No response

Other context

No response

Support Ignoring Users

What is this for?

bot

Feature

As a user, I want to be able to opt out from having my messages indexed by Answer Overflow. I would like to be able to do this on a per server or global basis.

Ideal solution or implementation

There needs to be a database table that stores deleted user ids, possibly having them be hashed as well. Before doing an operation on creating a user or relevant content associated with them, such as analytics, it needs to be checked if they are ignored.

Alternative solutions or implementations

No response

Other context

No response

Setup ElasticSearch

What is this for?

core

Feature

Add elastic search to the db library

Ideal solution or implementation

Similar implementation to prisma

Alternative solutions or implementations

No response

Other context

No response

DB Tests

This might be redundant but the createDefault functions should be inside the db file and the tests should verify createDefault() and .create() return the same thing

Bot Tests

The bot should have some simple tests implemented that verify the correct events are called on certain actions and that menus work correctly.

Manage Server Settings Menu (/server_settings)

Is your feature request related to a problem? Please describe.
As a server owner, I want to configure global server settings directly from Discord

Describe the solution you'd like
I'd like a menu that allows me to edit the following:

[Enable/Disable] Read The Rules Consent Enabled

Additional context
Reference menu:
image

Forum Post Guidelines Consent

Is your feature request related to a problem? Please describe.
As a server owner, I want automated ways to get user consent without them having to see the manually posted prompt, while keeping users informed about consenting

Describe the solution you'd like
In forum post guidelines that have to be read before a post is made, put the consent prompt and mark posters as consenting

  • This server utilizes Answer Overflow to publicly display help channel content on the web. By posting in this channel, you are providing consent to publicly display your messages in order to help others find answers.

Additional context

image

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.