Skip to content

w-arantes/sportscentral

Repository files navigation

SportsCentral Logo


About

SportsCentral is a sporting events platform that allows fans to register for sporting events, view details, information, and keep up with all event updates.

https://sportscentral.vercel.app/

Features

  • ⚡️ Next.js 13
  • ⚛️ React 18
  • ⛑ TypeScript
  • ☯️ Chakra-UI - A simple, modular and accessible component library
  • 🧪 Cypress — For application e2e tests
  • 📏 ESLint — To find and fix problems in your code
  • 💖 Prettier — Code Formatter for consistent style
  • 🐶 Husky — For running scripts before committing
  • 🚓 Commitlint — To make sure your commit messages follow the convention
  • 🖌 Renovate — To keep your dependencies up to date
  • 🚫 lint-staged — Run ESLint and Prettier against staged Git files
  • 👷 PR Workflow — Run Type Check & Linters on Pull Requests
  • ⚙️ EditorConfig - Consistent coding styles across editors and IDEs
  • 🗂 Path Mapping — Import components or images using the @ prefix

Screenshots

Home

Dashboard

Event

Available Application Routes

PUBLIC ROUTES (no requires sign-in to view)

The public routes are optimized for SEO (Search engine optimization, using NextJS features)

  • / — Homepage.
  • /sign-in — Sign-in page.
  • /sign-up — Sign-up page.
  • /events — All available events.
  • /events/category/:id — All available events by category.
  • /event/:id — Event page.

PRIVATE ROUTES (regular user and admin):

  • /dashboard — Dashboard page with user subscriptions and available events and event categories.
  • /dashboard/profile — User profile.
  • /dashboard/subscriptions — User event subscriptions.

ADMIN ROUTES (only admin users have permission to access):

USERS MANAGEMENT

  • /dashboard/admin/users — List and manage all platform users (list, delete, update controls).
  • /dashboard/admin/users/create — Register a new user.
  • /dashboard/admin/users/edit/:id — Edit users.

EVENTS MANAGEMENT

  • /dashboard/admin/events — List and manage all events (list, delete, update controls).
  • /dashboard/admin/events/create — Register a new event.
  • /dashboard/admin/events/edit/:id — Edit events.

CATEGORIES MANAGEMENT

  • /dashboard/admin/categories — List and manage all categories (list, delete, update controls).
  • /dashboard/admin/categories/create — Register a new category.
  • /dashboard/admin/categories/edit/:id — Edit categories.

Sign-in Credentials

Admin user

email: [email protected]
password: sportscentral

Regular user

email: [email protected]
password: sportscentral

Documentation

Application Directory Structure

  • .github — GitHub configuration including the CI workflow.
  • .husky — Husky configuration and hooks.
  • public — Static assets such as robots.txt, images, and favicon.
  • src — Application source code, including pages, components, styles.
  • src — Application shared components.
  • src/layout — Layout composition components.
  • src/contexts — Application Contexts.
  • src/data — json-server database.
  • src/domain — Application domain layer (models, entities, usecases).
  • src/helpers — Application helper functions and formatters.
  • src/infra — HTTP client and platform configuration.
  • src/pages — Application Pages.
  • src/theme — Application theme, tokens and design-system configuration.

Requirements

  • Node.js >= 12.22.0
  • Yarn

How to run the application locally:

The application uses a local server composed by a JSON file, located in src/data/server.json

Start the json-server using yarn dev:server and the application with yarn:dev in the terminal

Switch to Yarn/npm

If you'd like to switch to npm/pnpm, to run locally, delete the yarn.lock file, install the dependencies with npm/pnpm. This application uses yarn by default in the application CI and workflow.

Scripts

  • yarn dev — Starts the application in development mode at http://localhost:3000.
  • yarn build — Creates an optimized production build of your application.
  • yarn start — Starts the application in production mode.
  • yarn type-check — Validate code using TypeScript compiler.
  • yarn lint — Runs ESLint for all files in the src directory.
  • yarn format — Runs Prettier for all files in the src directory.
  • yarn cypress — Runs Cypress locally.
  • yarn test:e2e — Runs the Cypress e2e tests locally.

Path Mapping

TypeScript are pre-configured with custom path mappings. To import components or files, use the @ prefix.

import { Button } from '@/components/Button';

// To import images or other files from the public folder
import avatar from '@/public/avatar.png';

About this project

The conception of the application was based on the creation of the product 'SportsCentral' and meeting the requirements in a code challenge.

About

SportsCentral Web Application - Discover Great Sport Events

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages