You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
dandanalaa 2d8ad1c893
Mise à jour de 'Jenkinsfile'
3 years ago
.vscode fix - modifications importantes 4 years ago
components corr test 4 years ago
context add - loading spinner, administration, navbar modfications 4 years ago
e2e correction test 4 years ago
enum add - loading spinner, administration, navbar modfications 4 years ago
lib first commit 4 years ago
middleware ✅add : correction ajout de gain et api test code 4 years ago
pages fix : alt image tester cadeau 4 years ago
prisma fix - modifications importantes 4 years ago
public ajout sitemap 4 years ago
scripts Mise à jour de 'scripts/deliver.sh' 4 years ago
styles fix - image tout savoir caché quand navbar mobile ouvert 4 years ago
types add - loading spinner, administration, navbar modfications 4 years ago
.babelrc add - TU 4 years ago
.env Mise à jour de '.env' 3 years ago
.gitignore ✅ add : gitignore migration 4 years ago
Dockerfile 🚀 test pour production 4 years ago
Jenkinsfile Mise à jour de 'Jenkinsfile' 3 years ago
README.md add - test with playwright 4 years ago
docker-compose.yaml fix - probleme ports, changement readme 4 years ago
jest.config.js correction test 4 years ago
jest.setup.js ✨ 4 years ago
next-env.d.ts 🎨 project base 4 years ago
next-sitemap.config.js ajout sitemap 4 years ago
next.config.mjs 📝 add - next config 4 years ago
package-lock.json ajout sitemap 4 years ago
package.json ajout sitemap 4 years ago
playwright.config.ts correction test 4 years ago
tsconfig.jest.json add - TU 4 years ago
tsconfig.json ✨ 4 years ago

README.md

TheTipTop - Fullstack App with Next.js


Explication rapide en français :

Une fois le repo cloné lancer les commandes suivantes :

Lancer docker avec Docker Destop

docker compose up pour créer les containers avec la base de donnée PosgreSQL et pgAdmin

npm install va installer les dépendances

npx prisma migrate dev va hydrater la db et jouer le fichier de seed (important)

npm run db (pour reset les data de la db) va reset la db et re-executer le fichier de seed

npm run dev va lancer l'application sur le localhost:3000

npx prisma studio pour naviguer dans la db via le localhost:5555 sans utiliser pgAdmin

http://localhost:3000/api/superadmin?pass=1234 pour upgrade votre compte en superadmin (vous devez être connecté)

http://localhost:3000/api/gain pour générer un gain (vous devez être connecté en tant que superadmin ou admin)

npm run test tests faits avec Playwright


This project use TypeScript with Next.js** using React (frontend), Next.js API routes and Prisma Client (backend). It implement authentication using NextAuth.js. The app uses an PostgreSQL database file on docker's container.

Note that the app uses a mix of server-side rendering with getServerSideProps (SSR) and static site generation with getStaticProps (SSG). When possible, SSG is used to make database queries already at build-time . Sometimes, the user requesting data needs to be authenticated, so SSR is being used to render data dynamically on the server-side.

Getting started

Install npm dependencies:

npm install

2. Create and seed the database

Run the following command to create your PostgreSQL docker's container

docker compose up 
npx prisma migrate dev 

When npx prisma migrate dev is executed against a newly created database, seeding is also triggered. The seed file in prisma/seed.ts will be executed and your database will be populated with the sample data.

If you want to reset the database data run the following command

npm run db

4. Start the app

npm run dev

The app is now running, navigate to http://localhost:3000/ in your browser to explore its UI.