A web application frontend designed to serve Light Messages Backend.
- Preview Images
- Prerequisites
- Installation
- Environment Configuration
- Development
- Production Build
- License
Before you begin, ensure you have installed:
- Clone the repository:
git clone https://github.com/abdelslam1997/light_messages_frontend.git cd light_messages_frontend npm install
Create a .env
file in the project root and configure:
REACT_APP_API_BASE_URL=http://light-messages.local/api/v1
REACT_APP_WEBSOCKET_URL=ws://light-messages.local/ws
Note: Replace
light-messages.local
with your backend URL
Start the development server:
npm run dev
Access the application at http://localhost:5173
Build and run using Docker:
# Build the image
docker build -f docker/production/Dockerfile -t light_messages_frontend:latest .
# Run the container
docker run -p 80:80 light_messages_frontend:latest
The production build uses these environment variables:
REACT_APP_API_BASE_URL=http://your-api-domain/api/v1
REACT_APP_WEBSOCKET_URL=ws://your-api-domain/ws
The project uses GitHub Actions for automated builds:
- Triggers on pushes to main branch with commit message containing 'build-docker-image'
- Builds and pushes to Docker Hub as
abdelslam1997/light_messages_frontend
- Tags:
latest
andv1.0.x
To trigger a build:
git commit -m "your changes [build-docker-image]"
git push origin main
This project is licensed under the MIT License.