Giter Club home page Giter Club logo

discord-wrapped's Introduction

Discord Wrapped

An insight on all the data collected by Discord, formed into a video just like Spotify Wrapped!

Try it out

You can try it out on discordwrapped.com.

Credits

Self-hosting

Prerequisites:

  • Node.js and npm installed on your machine.

Development

git clone https://github.com/Assassin-1234/discord-wrapped.git
cd discord-wrapped
cd frontend
npm install
npm run dev
cd ..
cd backend
npm install
npm run dev

Open your web browser and go to localhost:5173 or the URL specified in the frontend logs if the default port is already in use.

Production

Docker ๐Ÿณ

git clone https://github.com/Assassin-1234/discord-wrapped.git
cd discord-wrapped

Edit .env.example in the backend directory to your preference.

docker-compose up -d

Using a reverse proxy, put the backend and frontend on the same address by adding a custom address /api/ with the chosen backend port (3020 by default).

Process Manager

cd frontend
npm install
npm run build
# Serve the build with your chosen process manager (e.g., http-server)
cd ..
cd backend
mv .env.example .env
npm install
npm run build
# Run with your chosen process manager
xvfb-run -s "-ac -screen 0 1920x1080x24" npm run start

Using a reverse proxy, put the backend and frontend on the same address by adding a custom address /api/ with the chosen backend port (3020 by default).

Contributing

Pull requests are appreciated

  • Do not modify the audio.mp3
  • Do not push your own data package

License

This OSS project is under an Apache license.

Contributors

image

discord-wrapped's People

Contributors

arnav-kr avatar assassin-1234 avatar dependabot[bot] avatar face-hh avatar ggorg0 avatar hxm4tech avatar iliannnn avatar redvortexdev avatar stef-00012 avatar zyztem 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

Watchers

 avatar  avatar  avatar

discord-wrapped's Issues

linux

On linux you dont use .exes...

$ node .             
running
Currently processing the events, might take some time!
/home/ggorg/Downloads/discord-wrapped/src/animations/wrap.js:137
					reject(new Error(`Error extracting first frame: ${err.message}`));
					       ^

Error: Error extracting first frame: spawn /home/ggorg/Downloads/discord-wrapped/ffmpeg.exe ENOENT
    at FfmpegCommand.<anonymous> (/home/ggorg/Downloads/discord-wrapped/src/animations/wrap.js:137:13)
    at FfmpegCommand.emit (node:events:512:28)
    at emitEnd (/home/ggorg/Downloads/discord-wrapped/node_modules/fluent-ffmpeg/lib/processor.js:424:16)
    at /home/ggorg/Downloads/discord-wrapped/node_modules/fluent-ffmpeg/lib/processor.js:433:16
    at wrapper (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:271:20)
    at next (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:5795:24)
    at /home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:327:20
    at wrapper (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:271:20)
    at next (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:5795:24)
    at /home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:327:20

Node.js v19.6.0,

Here you install ffmpeg/ffprobe from the system package manager, which most commonly places it in:

$ which ffmpeg
/usr/bin/ffmpeg

$ which ffprobe
/usr/bin/ffprobe

Quick workaround:

$ ln -s $(which ffmpeg) ffmpeg.exe
$ ln -s $(which ffprobe) ffprobe.exe

Weird paths

  1. When I put the folder in another one named discord-wrapped, it doesn't work.
$ pwd
/home/ggorg/Downloads/discord-wrapped/discord-wrapped

$ node .
running
node:fs:585
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/home/ggorg/Downloads/discord-wrapped/package/account/user.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at getUserInfo (/home/ggorg/Downloads/discord-wrapped/discord-wrapped/src/extractor/extract.js:170:28)
    at module.exports (/home/ggorg/Downloads/discord-wrapped/discord-wrapped/src/animations/wrap.js:91:21)
    at /home/ggorg/Downloads/discord-wrapped/discord-wrapped/index.js:4:8
    at Object.<anonymous> (/home/ggorg/Downloads/discord-wrapped/discord-wrapped/index.js:5:3)
    at Module._compile (node:internal/modules/cjs/loader:1246:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1300:10)
    at Module.load (node:internal/modules/cjs/loader:1103:32)
    at Module._load (node:internal/modules/cjs/loader:942:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/ggorg/Downloads/discord-wrapped/package/account/user.json'
}

Node.js v19.6.0

Possible cause: https://github.com/Assassin-1234/discord-wrapped/blob/main/src/animations/wrap.js#L1-L2 + more (just fixing line 1 and 2 didn't fix it)
Possible fix: use node/path's resolve() and join() functions

  1. Bad practice: just appending paths together hoping that slashes (/) line up
    Possible fix: use node/path's join() function

  2. Bad practice: using forward slashes (/) on windows, which uses backslashes (\)
    Possible fix: use node/path's join() function

As much as I'd like to make a PR, the code is too complicated and messy so it would take me way too long.

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.