Giter Club home page Giter Club logo

theladswebsite's Introduction

logo

The Lads Website

This website related to Geometry Dash was made for the members of the discord "The Lads Private Server". It's not intended to be useful for the community.

Todo

  • Service that save the data to the database instead of making a request to the external pointercrate API.
  • Refractor the code of the API
  • Password reset
  • Make the admin able to change the avatars of the users.
  • Delete users from the dashboard

To Fix

  • Can't login on mobile
  • Can register on mobile but show an error like it didn't work

Build Setup

Install dependencies

npm install

Generate the database

npx prisma db push
npx browserslist@latest --update-db

Configure the domains

You will have to change this only if you want to upload the project on your own server. Change the domains with the IP of your server or your domain name.

store/store.js

export const state = () => ({
  config: {
    // 'domain': "theladsofficial.com",
    'domain': "localhost:3000"
  }
})

nuxt.config.js

axios: {
    // baseURL: "https://theladsofficial.com",
    baseURL: "http://localhost:3000",
}

Configure the .env

Rename the .env.example to .env

Here is the content of the .env

DOMAIN="example.com"
SECRET_DB="your_secret_string"
TWITCH_ID="Your twitch id"
TWITCH_SECRET="Your twitch secret"
  • Domain is the IP/domain of your server. Set it to localhost:3000 when you work on your local machine
  • SECRET_DB is the string used to encrypt the passwords
  • TWITCH_ID and TWITCH_SECRET are used to show when a streamer of the discord is streaming.

Refer to the Twitch Documentation to generate your Client ID and your Client Secret.

Launch the server in development mode

npm run dev

Build for production and launch server

npm run build
npm run start

For detailed explanation on how things work, check out the documentation.

API

Check this documentation to see how to use the API.

Admin dashboard

First, you have to manually edit the database to make your account admin.

img.png

The default value is 0. Just change it to 1 like the picture above. Now, when you'll login to your account, you'll see the admin field in the navbar.

img.png

This dashboard give you access to every users registered and allows you to edit their data.

img.png img.png

This is the same page that the one that users can access by going to /profile to edit their profile.

In addition, you have 3 new fields available since you're an admin.

  • Admin - Set it to 0 or 1 to make the user an admin or not. You don't have to go to the database anymore to make users admin.
  • Verified - Set it to 1 to make the user a member of the team, he will now appear in the leaderboard.
  • Pointercrate ID - Put the pointercrate ID of the user their, it will be used to fetch the data for the leaderboard.

Here is an example of how to get the pointercrate ID of an user. Ask the member of your team what is his pointercrate username.

For the example, the username is Hikudo

To get it, got to https://pointercrate.com/api/v1/players?name_contains=hikudo

Here is the response :

img.png

The first field "id" is the pointercrate ID that you have to use.

Special Directories

You can create the following extra directories, some of which have special behaviors. Only pages is required; you can delete them if you don't want to use their functionality.

assets

The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.

More information about the usage of this directory in the documentation.

components

The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.

More information about the usage of this directory in the documentation.

layouts

Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.

More information about the usage of this directory in the documentation.

pages

This directory contains your application views and routes. Nuxt will read all the *.vue files inside this directory and setup Vue Router automatically.

More information about the usage of this directory in the documentation.

plugins

The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use Vue.use(), you should create a file in plugins/ and add its path to plugins in nuxt.config.js.

More information about the usage of this directory in the documentation.

static

This directory contains your static files. Each file inside this directory is mapped to /.

Example: /static/robots.txt is mapped as /robots.txt.

More information about the usage of this directory in the documentation.

store

This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.

More information about the usage of this directory in the documentation.

theladswebsite's People

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.