Codealot is a friendly community project. It is a place where you can add features and functionalities from Takealot, and it is designed to help developers with little or no experience to get a taste and feel of what it’s like to work on big production projects.
Before you can start working with Codealot, you need to:
-
Install git, Node.js (>= 16.0.0).
-
Fork the Codealot repository using the Fork button on GitHub.
-
Clone the forked repository to your computer using the following commands (replace [your account] with the account you forked the repositories to): git clone https://github.com/[your_account]/codealot.git
To run Codealot locally, you'll first need to install its dependencies and build the app locally.
Do this like so:
cd codealot
npm install# To build the docker image for the app
docker build -t takealot-clone-store-front:1.0 .# rebuild arbitrarily, won't affect running containers
docker-compose build
# rebuild and immediately start containers
docker-compose up -d --buildYou will need the get the api access token from Commercejs
- Create an account with Commercejs
- Login to your account and create a new store.
- Create at least 6 products for your new store.
- On your dashboard under developer tap, click API keys & CORS to get your API access token.
- Back to your local Codealot project, create an .env file on the root folder of your project.
- Paste your access token from Commercejs
Do this like so:
REACT_APP_CHEC_PUBLIC_KEY='YOUR API ACCESS TOKEN'- Start your app
codealot npm startnpm run buildBuilds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.