This repository contains a full-stack application for the National Space Hackathon with a Python Flask backend and Next.js frontend.
Docker Hub: https://hub.docker.com/r/bhavikpunmiya/national-space-hackathon
Backend URL: https://national-space-hackathon-91717359690.us-central1.run.app/
Research Paper & Report: https://drive.google.com/file/d/1pxMhns39Y0feQn_kL--_e1JCguZMZRMR/view?usp=sharing
Video/Demo Link: https://drive.google.com/file/d/13MXXCcvZwoIqTtRkCzUBV5I-Fgd0JS9i/view?usp=sharing.
├── backend/ # Python Flask backend
│ ├── app/ # Main application code
│ │ ├── main.py # Entry point for the backend
│ ├── requirements.txt # Python dependencies
│
├── frontend/ # Next.js frontend
│ ├── src/ # Source code
│ ├── package.json # Node.js dependencies
│
├── dockerfile # Docker configuration
├── start.sh # Service startup script
├── simple_checker.sh # Automated testing script
The easiest way to run the application is using Docker:
- Build the Docker image:
docker build -t space-app .- Run the container:
docker run -p 8000:8000 -p 3000:3000 space-appTo share your application with others via Docker Hub:
- Create a Docker Hub account at https://hub.docker.com/
- Login to Docker Hub:
docker login- Tag your image with your Docker Hub username:
docker tag space-app yourusername/space-app:latest- Push the image to Docker Hub:
docker push yourusername/space-app:latest- Others can then pull and run your image:
docker pull yourusername/space-app:latest
docker run -p 8000:8000 -p 3000:3000 yourusername/space-app:latestThe repository includes a checker script to verify the application's functionality:
- Make the script executable:
chmod +x simple_checker.sh- Run the checker (requires sudo):
sudo ./simple_checker.sh <github_repo_url>The script will:
- Clone the repository
- Build the Docker image
- Run the container
- Test the placement endpoint
- Clean up resources
If you prefer to run the services separately without Docker:
# Navigate to the backend directory
cd backend
# Install Python dependencies
pip install -r requirements.txt
# Run the Flask application
python -m app.main# Navigate to the frontend directory
cd frontend
# Install Node.js dependencies
npm i --legacy-peer-deps
# Build the frontend
npm run build
# Start the frontend server
npm run startOnce running, the application can be accessed at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
The backend provides several API endpoints including:
GET /: API status endpointGET /api/client/iss_cargo: ISS cargo management dataPOST /api/placement: Cargo placement endpoint
Additional endpoints are available for placement, simulation, waste management, and search functionality.
When making changes to the codebase:
- For backend changes, restart the Flask server
- For frontend changes, Next.js supports hot-reloading in development mode
If you encounter issues with Node.js dependencies, try using the --legacy-peer-deps flag:
npm i --legacy-peer-depsFor Docker-related issues, ensure Docker is correctly installed and running on your system.
Feel free to contribute by opening issues or submitting pull requests.
This project is licensed under MIT License.