mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-19 00:57:55 -05:00
update readme!
This commit is contained in:
parent
a059d6b4f8
commit
51549df6b6
2
.env
2
.env
|
|
@ -2,4 +2,4 @@
|
|||
DISCORD_CLIENT_ID=
|
||||
DISCORD_CLIENT_SECRET=
|
||||
JWT_SECRET=
|
||||
NEXTAUTH_URL=
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
53
README.md
53
README.md
|
|
@ -25,14 +25,61 @@ Live version: [https://sendou.ink/](https://sendou.ink/)
|
|||
|
||||
🦑 X Rank Top 500 results can be browsed through far more conveniently than on the official app
|
||||
|
||||
🦑 X Rank Top 500 leaderboards to compare yourself against other players
|
||||
|
||||
🦑 Browse through detailed tournament results
|
||||
|
||||
🦑 Choose between light and dark mode
|
||||
|
||||
## Installation & getting started
|
||||
## Setting up the project locally
|
||||
|
||||
TODO
|
||||
### Access pages that don't need database access
|
||||
|
||||
With the following steps you can access a few pages that don't need a database: home page (`/`), build analyzer (`/analyzer`) and map planner (`/plans`)
|
||||
|
||||
1. Clone the project
|
||||
2. Run `npm i` to install dependencies
|
||||
3. Run `npm run compile` to compile translation files.
|
||||
4. Run `npm run dev` to start the developmen server at http://localhost:3000/
|
||||
|
||||
### Access rest of the pages
|
||||
|
||||
In addition to the steps above the steps below enable access to rest of the pages.
|
||||
|
||||
5. Create a file called `.env` in the `prisma` folder. In it you need an environmental variable called `DATABASE_URL` that contains the URL to a running PostgreSQL database. For example mine looks like this while developing:
|
||||
|
||||
```
|
||||
DATABASE_URL=postgresql://sendou@localhost:5432
|
||||
```
|
||||
|
||||
_You can see [Prisma's guide on how to set up a PostgreSQL database running locally](https://www.prisma.io/dataguide/postgresql/setting-up-a-local-postgresql-database) for more info._
|
||||
|
||||
6. Once you have a database running run `psql -d postgres < dump.sql` in the `prisma` folder (assuming your database name is `postgres`). This formats the database with the correct tables and fills it with real data dumped from the production site.
|
||||
|
||||
### Enable logging in
|
||||
|
||||
In addition to the steps above the steps below enable logging in.
|
||||
|
||||
7. Create a file called `.env.local` in the root folder. In it you need following variables:
|
||||
|
||||
```
|
||||
DISCORD_CLIENT_ID=
|
||||
DISCORD_CLIENT_SECRET=
|
||||
JWT_SECRET=
|
||||
```
|
||||
|
||||
a) Go to https://discord.com/developers/applications
|
||||
b) Select "New Application"
|
||||
c) Go to your newly generated application
|
||||
d) On the "General Information" tab both "CLIEN ID" and "CLIENT SECRET" can be found.
|
||||
e) On the "OAuth2" tab add `http://localhost:3000/api/auth/callback/discord` in the list of redirects.
|
||||
|
||||
`JWT_SECRET` can be any randomly generated reasonably long string.
|
||||
|
||||
## Contributing
|
||||
|
||||
TODO
|
||||
Check out the [list of existing issues I haven't assigned for myself](https://github.com/Sendouc/sendou.ink/issues?q=is%3Aopen+is%3Aissue+no%3Aassignee) to find issues I could accept help with. Before you start working on one please leave a comment.
|
||||
|
||||
Is there a bug or a new feature that isn't an issue yet? Feel free to leave one.
|
||||
|
||||
Please always leave a comment or create an issue before working on anything.
|
||||
|
|
|
|||
95674
prisma/dump.sql
Normal file
95674
prisma/dump.sql
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,7 @@
|
|||
// @ts-nocheck
|
||||
|
||||
import { Prisma } from "@prisma/client";
|
||||
import prisma from "prisma/client";
|
||||
import prisma from "../client";
|
||||
import buildsJson from "./mongo/builds.json";
|
||||
import placementsJson from "./mongo/placements.json";
|
||||
import playersJson from "./mongo/players.json";
|
||||
|
|
@ -26,7 +28,10 @@ for (const player of playersJson) {
|
|||
});
|
||||
}
|
||||
|
||||
const discordIdToBuilds = new Map<string, BuildCreateWithoutUserInput[]>();
|
||||
const discordIdToBuilds = new Map<
|
||||
string,
|
||||
Prisma.BuildCreateWithoutUserInput[]
|
||||
>();
|
||||
|
||||
const modes: any[] = [];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user