Skip to content

Main repository for MyCargonaut, managing modular projects for ride-sharing and freight-sharing services.

License

Notifications You must be signed in to change notification settings

BatatiDE/mycargonaut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 MyCargonaut

MyCargonaut is a platform that connects users for ride-sharing and freight-sharing services. Whether you’re a user looking for a ride or a driver offering one, MyCargonaut has you covered.


🌟 Features

  • Secure Authentication:
    • User and driver registration and login.
    • Password reset functionality.
  • Ride and Freight Management:
    • Post ride offers or freight requests.
    • Search and filter options based on location and date.
  • Real-Time Tracking:
    • GPS-based live location sharing for drivers.
  • Reviews and Ratings:
    • Feedback system for better trust and transparency.
  • Payment Integration:
    • Secure payment gateway for transactions.

🛠 Tech Stack

Frontend Backend Database CI/CD
Next.js Spring Boot PostgreSQL GitHub Actions
Tailwind CSS Hibernate ORM Prisma ORM Docker
NextAuth.js

📁 Project Structure

.
├── backend/         # Spring Boot backend
│   ├── src/         # Source files for backend logic
│   └── ...
├── frontend/        # Next.js frontend
│   ├── prisma/      # Prisma schema
│   ├── src/         # React components and pages
│   └── ...
├── database/        # Database migration files
├── .github/         # CI/CD workflows
└── README.md        # Project documentation

🚀 Getting Started

1️⃣ Prerequisites

Ensure you have the following installed:

  • Node.js: v18.18.0 or higher
  • Java: 17 or higher
  • PostgreSQL: Local or hosted
  • npm: For managing frontend dependencies
  • Gradle: For backend builds

2️⃣ Installation and Setup

Backend Setup

  1. Navigate to the backend folder:
    cd backend
  2. Update application.properties with your PostgreSQL credentials:
    spring.datasource.url=jdbc:postgresql://<DB_HOST>:<DB_PORT>/<DB_NAME>
    spring.datasource.username=<DB_USER>
    spring.datasource.password=<DB_PASSWORD>
  3. Start the backend server:
    ./gradlew bootRun
  4. The backend will run at http://localhost:8080.

Frontend Setup

  1. Navigate to the frontend folder:
    cd frontend
  2. Install dependencies:
    npm install
  3. Configure environment variables in .env.local:
    DATABASE_URL=postgresql://<DB_USER>:<DB_PASSWORD>@<DB_HOST>:<DB_PORT>/<DB_NAME>
    NEXTAUTH_SECRET=your-secret-key
    
  4. Start the frontend server:
    npm run dev
  5. The frontend will run at http://localhost:3000.

✅ Testing

Backend Tests

Run backend unit tests:

cd backend
./gradlew test

Frontend Tests

Run frontend unit tests:

cd frontend
npm test

Run Cypress E2E tests:

cd frontend
npx cypress open

🚢 Deployment

Staging

Staging is automated via GitHub Actions:

  1. Push changes to the features/* branch:
    git push origin features/*
  2. Create a pull request from features/* to develop.
  3. CI/CD will:
    • Run linting, tests, and build processes.
    • Deploy the application to the staging environment.

Production

Production deployment occurs after merging develop into main:

  1. Create a pull request from develop to main.
  2. Once approved, the application will deploy to production.

🧑‍💻 Contributing

We welcome contributions! Follow these steps:

  1. Fork the repository and clone it locally.
  2. Create a new branch for your feature:
    git checkout -b feature/<feature-name>
  3. Commit your changes:
    git commit -m "Add feature: <feature-name>"
  4. Push your branch:
    git push origin feature/<feature-name>
  5. Create a pull request to the develop branch.

📜 License

This project is licensed under the MIT License.


🙏 Acknowledgments



About

Main repository for MyCargonaut, managing modular projects for ride-sharing and freight-sharing services.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published