Skip to content

radek2s/BetKeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

369 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

🏗️ Project under construction...

Project enters final phase before release of version 3.0 according to BetKeeper plan. Now application is validated against usability tests in small group of people.

About

Bet Keeper is an IT solution designed to manage bet among group of friends or anyone who enjoys making light-hearted bets and competitions with their circle. This platform simplify the process of recording, tracking and resolving bets ensuring that all participants stays up-to date with their ventures.
read more...

Development plan

The main goal of this project is to show my experience in designing and developing web applications. The project will follow the full software development lifecycle, starting from design, then moving through implementation, verification, and validation. Each phase will be completed in a waterfall model. During the validation phase, I will collect feedback that will help improve the application in the next version.

Design Phase

In this phase, I will define the requirements and prepare sketches and interface designs. This will help set the scope of the work and the expected result.

Implementation Phase

During implementation, I will build each module of the application using good software development practices. The code will be clean, maintainable, and easy to extend.

Verification Phase

codecov

All parts of the application will be verified using unit tests and end‑to‑end tests. This will ensure that the system works correctly and meets the defined requirements.

Validation Phase

The ready release candidate version will be shared with a small test group. Their feedback will help evaluate the usability of the application and guide improvements for the next release.

... Current phase ...

Technology

  • NX - Build platform to manage codebase and organize modules within BetKeeper monorepo.

  • Vite - Build Tool.

  • Next.js - React Framework for full stack experience for web-application.

  • Biome.js Performant toolchain for WebApplication

  • Vercel Hosting for Next.js application

  • Supabase PostgreSQL database provider

  • Corbado Passwordless authentication provider

  • Playwright E2E Test tool

Sub modules

  • Domain - business logic and tests of core BetKeeper objects
  • Application - application layer that host an UI and wrap business logic with database persistence and server logic
  • E2E Tests - end-to-end tests for BetKeeper application that check if requirements are met using cucumber and playwright.

Development Quick Start

Project runs on Node.js environment and is required for development.

Dependencies installation and workspace initialization:

npm i

Environment variables are described in .env file.
Create .env.local file to override environment variables without adding to git stash area and keep your secrets away from version control.

Authentication preparation

Prepare Manual authentication project
MANUAL Manual Authentication (via manual set of active user ID - for tests or local development)

To change active logged user visit http://localhost:3000/dev and enter the user ID you want to switch to.

Prepare Corbado authentication project [advanced]
CORBADO Corbado Authentication requires creation of free open-source project and providing valid properties to .env.local variable

DB_PRISMA_URL="file:./betKeeper.db"
NEXT_PUBLIC_CORBADO_PROJECT_ID=pro-xxxxxxxxxxxxxxxxxxx
CORBADO_API_SECRET=corbado1_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CORBADO_FRONTEND_API=https://pro-xxxxxxxxxxxxxxxxxxx.frontendapi.cloud.corbado.io
CORBADO_BACKEND_API=https://backendapi.cloud.corbado.io

Create in Corbado panel a new user.

Replace providerId value in database in user table with userId from Corbado panel after performing dev:init command from next step.

Environment initialization

npm run dev:init # To initialize SQLite database (can be omitted when already created)

Development sever

npm run dev

Visit http://localhost:3000 and login as created user.

E2E Tests Quick start

Project use Playwright with TypeScript on Node.js environment that is required for test development and execution.
Check E2E Readme for more details

Installation of packages

npm i

To prepare environment for E2E test you need to generate database. Given script prepares empty SQLite database with initial user.

npm run e2e:init

Playwright perform auto-start of Next.js application in dev mode that performs hot-swap during code changes.
To start developing your E2E tests with Playwright UI run:

npm run e2e:ui

To just execute tests in headless mode:

npm run e2e

You can modify the E2E test environment in .env.test.local file by overriding available variables. This file is excluded from version control system.

License

Images from unDraw
Icons from fluentIcons

Using RadixUI Primitives

About

React PWA Application to handle bets that was made between people.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages