Code Monkey home page Code Monkey logo

arc3's Introduction

ARC V3

Arc V3 is the next generation of the open source ARC discord bot. The application now is complete with a web management dashboard coded in react JS and an API coded in express JS.

All three services are connected together using a central mongo database. The app also includes a database explorer deployed automatically (mongo-express)

Running the system

The arc system can be run easily using the docker-compose file provided

First you should set up your .env file as follows

TOKEN='TOKEN' #  This should be your discord bot application token obtained from the discord developer portal.

MONGODB_URI='mongodb://root:<password>@mongo:27017/Arc3?authSource=admin' # passwords here and the mongo_inidn_root_password should match
MONGO_INITDB_ROOT_PASSWORD=<password>

GUILD_ID='id' # TEMPORORY - Currently the system will only fully function on one main server. Input it's ID here. 

BUILD_PATH='../arc3-dash/build' # This is set to wherever your react client build will be relative to the expess server.

DISCORD_CLIENT_ID="id" # Discord application client id obtained from the discord developer portal.
DISCORD_CLIENT_SECRET="secret" # discord application client secret obtained from the discord developer portal.

DISCORD_REDIRECT_URI="<base_uri>/auth/callback" # only change the base_uri part unless you know what you are doing. This will control where the user is redirected apon login. The base_uri shoudl match the one found in the client_redirect_url variable and the hosted_url

JWT_SECRET="secret" # the secret used for JWT signing of the session tokens.

CLIENT_REDIRECT_URL="<base_uri>" # This is where the user will be redirected after logging in sucessfully.

DIRECT_URL="" # This is the oauth2 url that is generated by discord for the login link. Create this in the discord developer portal. 


HOSTED_URL="<base_uri>" # the base uri where the client and server are hosted.

Then, simply install docker and docker compose and then run it with this command.

docker compose up -d

Components

Untitled Diagram drawio

Arc3 + Discord Bot Client

Arc3 is a discord bot written in C# using the Discord.NET library to control the discord bot client. It interacts with the mongodb database as it's sole source of truth.

Arc3-api

Arc3-Api is an api written in expressJS that serves information from the mongo databse. It provides all the necessay routes for Arc3-Dash to work which is the web frontend. Arc3-Api serves the frontend at the root / http route and also uses oauth2 authentication to protect routes.

Arc3-dash

Arc3-Dash is a web frontend dashboard to manage and visualize data in the Arc3 system. Importantly, it is served by the Arc3-Api and thus levereages the same authentication available through that.

Arc3-tasks

Arc3-Tasks is a collection of node scripts that perform various useful actions for the arc system such as backups, restores, cleanup, data compliance, etc...

Ofelia Scheduler

This is a scheduler component that is used to trigger various actions inside of Arc3-Tasks by default it does an automated backup every 24 hours and a cleanup of data every 12 hours.

Development

You can see some of the instructions in the default readmes given by create-react-app and such. There is also some vscode configs given as part of the project where you can run and debug every part of the system individually.

arc3's People

Contributors

izzydotexe avatar

Stargazers

 avatar

Watchers

 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.