Skip to content

A rebuild of the fCC updated JavaScript curriculum's football team cards project with PHP and MongoDB Atlas

Notifications You must be signed in to change notification settings

Ksound22/football-team-cards-php-rebuild

Repository files navigation

Football Team Cards Rebuild with PHP and MongoDB Atlas

This is a rebuild of the football team cards project of the updated JavaScript curriculum for the article collaboration between freeCodeCamp and MongoDB. It uses MongoDB Atlas for the database and Tailwind CSS for styling.

Features

  • Displays Footballers Based on the option selected (goalkeepers, defenders, midfielders, forwards)
  • Uses MongoDB Atlas for database management

Prerequisites

Before you begin, ensure you have the following installed on your machine:

  • PHP 8+
  • Composer
  • MongoDB PHP extension

Installation

  1. Clone the Starter Branch of the Repository

    git clone https://github.com/Ksound22/football-team-cards-php-rebuild.git

    Or

    gh repo clone Ksound22/football-team-cards-php-rebuild
  2. Ensure MongoDB extension is Enabled

    Make sure the MongoDB PHP extension is installed and enabled. You can install it using PECL:

    sudo pecl install mongodb

    Then, add the following line to your php.ini file:

    extension=mongodb.so
  3. Install Dependencies

    composer install
  4. Create a .env File Off of the Existing .env.example File in the Root and add your Atlas URI, A.K.A Connection String

    Create .env file

    cp .env.example .env

    Add your Mongo URI

    MDB_URI="mongodb atlas connection string"
  5. Start the PHP Built-in Server

    php -S localhost:port-number

Project Structure

  • index.php: the main page that lists all footballers (players).
  • mongo_atlas_setup.php: MongoDB connection setup.
  • .env: environment variables (not included in the repository).
  • vendor/: composer dependencies (not included in the repository).

About

A rebuild of the fCC updated JavaScript curriculum's football team cards project with PHP and MongoDB Atlas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published