From a10eaba0285de85cc43bd6ad07838c46e070c09c Mon Sep 17 00:00:00 2001 From: LisaDaudibon Date: Mon, 25 Sep 2023 18:12:29 +0200 Subject: [PATCH 1/3] LD - DOCS starting a proper readme --- README.md | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index f4da3c4..55d7b32 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,5 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +## CHRORACLE +![GitHub language count](https://img.shields.io/github/languages/top/ChronoDAO/CHROracle) +![Discord](https://img.shields.io/discord/666344617536520207) -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +[CHROracle](app.chronodao.com) is a webapp to track and follow the market of the web 3 game Big Time. It follows close to real time the evolution of sales, floor price and other aspects of the market place. \ No newline at end of file From 13f57fb6a4aaffc2608cfc1f161a5d194b801e0e Mon Sep 17 00:00:00 2001 From: LisaDaudibon Date: Tue, 26 Sep 2023 12:08:25 +0200 Subject: [PATCH 2/3] LD DOC creating a .env.local for examples and continuing the readme --- .env.local | 12 +++++++++++ .gitignore | 2 +- README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 .env.local diff --git a/.env.local b/.env.local new file mode 100644 index 0000000..085a91d --- /dev/null +++ b/.env.local @@ -0,0 +1,12 @@ +#FOR REGULAR REQUESTS +DATABASE_URL="postgres://postgres:{your_supabase-adress}@db.{your_supabase_variables}.supabase.co:6543/postgres?pgbouncer=true " +#FOR MIGRATIONS +DIRECT_URL="postgres://postgres:{your_supabase-adress}@db.{your_supabase_variables}.supabase.co:5432/postgres" + +#DISCORD AUTHENTICATION - create a new discord application at (https://discord.com/developers/applications) +DISCORD_CLIENT_ID=566776545556 +DISCORD_CLIENT_SECRET=MTNVFON_Tgjo64jr7_f53Re7hir + +#NEXT_AUTH +NEXTAUTH_SECRET=IHOBHRFVIQNCvjdjvojven +NEXTAUTH_URL=http://localhost:3000/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 80b5ed0..e604543 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ yarn-debug.log* yarn-error.log* # local env files -.env*.local +.env # vercel .vercel diff --git a/README.md b/README.md index 55d7b32..910d4b8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,59 @@ -## CHRORACLE -![GitHub language count](https://img.shields.io/github/languages/top/ChronoDAO/CHROracle) -![Discord](https://img.shields.io/discord/666344617536520207) +# CHRORACLE +![GitHub language top](https://img.shields.io/github/languages/top/ChronoDAO/CHROracle) -[CHROracle](app.chronodao.com) is a webapp to track and follow the market of the web 3 game Big Time. It follows close to real time the evolution of sales, floor price and other aspects of the market place. \ No newline at end of file +[CHROracle](app.chronodao.com) is a webapp to track and follow the market of the web 3 game Big Time. It follows close to real time the evolution of sales, floor price and other aspects of the market place. + +## Table of Contents + +[Authors](#authors) +[Next-Auth](#next-auth) +[Run locally](#run-locally) +[Licence](#licence) + +### Authors + +[@LionelDiot](https://github.com/LionelDiot) +[@AndreaSolis](https://github.com/Andreasolisgarcia) +[@Cyber-Geooorge](https://github.com/Cyber-Geooorge) +[@LisaDaudibon](https://github.com/LisaDaudibon) +[@1996thomas](https://github.com/1996thomas) + +### Next-Auth +This project handles authentication for the users using next-auth and jwt. + +To add a field into the table User, you have to modify the following files : +- `auth.d.ts` at the root level, +- `lib/prisma/auth.ts`, +and the route/component where you want to show the new information. + +To only add an info to the table user, change the `ìnterface user` and then the profile info in the `lib/prisma/auth.ts` file, to get a new info in the session, change both the `jwt` and the `session interface` in the `auth.d.ts` and the info you get in the `auth.ts` file. + +### Run locally + +Clone the project + +```bash + git clone https://link-to-project +``` + +Go to the project directory + +```bash + cd my-project +``` + +Install dependencies + +```bash + npm install +``` +Transform the ``.env.local` into `.env` and add your own discord API key and supabase key. + +Start the server + +```bash + npm run start +``` + +### License +This project is protected under the GNU License. \ No newline at end of file From c628b57d7d449e8d7af452a0a937d17576781b6b Mon Sep 17 00:00:00 2001 From: LisaDaudibon Date: Tue, 26 Sep 2023 12:09:50 +0200 Subject: [PATCH 3/3] LD DOC adding the url of discord and supabase --- .env.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.local b/.env.local index 085a91d..473c2e8 100644 --- a/.env.local +++ b/.env.local @@ -1,4 +1,4 @@ -#FOR REGULAR REQUESTS +#FOR REGULAR REQUESTS - create a new supabase database at (https://supabase.com/) DATABASE_URL="postgres://postgres:{your_supabase-adress}@db.{your_supabase_variables}.supabase.co:6543/postgres?pgbouncer=true " #FOR MIGRATIONS DIRECT_URL="postgres://postgres:{your_supabase-adress}@db.{your_supabase_variables}.supabase.co:5432/postgres"