Skip to content

A Laravel 12 RESTful API for managing job postings and applications. Built with scalability and clean code practices in mind, including authentication, form validation, automated notifications, and background job processing.

Notifications You must be signed in to change notification settings

tasnimalshair/Job-Manager-api

Repository files navigation

Job Manager API

A Laravel 12 RESTful API for job listings and applications. Users can browse and apply for jobs, while admins can manage job posts and application statuses.


🚀 Features

  • 🔐 User authentication (register/login)
  • 🧑‍💼 Role-based access (Admin & User)
  • 📋 Job CRUD (Admin only)
  • 📩 Apply to jobs (User only, one-time per job)
  • ✉️ Email notification when application is accepted
  • 🧾 Application logging
  • ✅ Feature Testing and unit testing
  • 📖 API Documentation included

⚙️ Requirements

  • PHP 8.2+
  • Laravel 12
  • MySQL
  • Composer
  • Gmail SMTP for email testing

🛠️ Installation & Setup

git clone https://github.com/your-username/job-manager-api.git
cd job-manager-api

composer install
cp .env.example .env
php artisan key:generate

Configure .env:

Set your DB credentials and email settings:

DB_DATABASE=job_manager
DB_USERNAME=root
DB_PASSWORD=

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=[email protected]
MAIL_PASSWORD=uheghlynzmhvfgzr
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="Job Manager"

Then run:

php artisan migrate --seed
php artisan serve


📌 API Endpoints

🔐 Auth

Method Endpoint Description
POST /api/register Register new user
POST /api/login Login user

🧑‍💼 Admin - Jobs Management

Method Endpoint Description
GET /api/admin/jobs List all jobs
GET /api/admin/jobs/{job} Show specific job
POST /api/admin/jobs Create a job
PUT /api/admin/jobs/{job} Update job
DELETE /api/admin/jobs/{job} Delete job
GET /api/admin/jobs/toggleStatus/{job} View current status
POST /api/admin/jobs/toggleStatus/{job} Toggle job status (active/inactive)

🗃️ Admin - Applications Management

Method Endpoint Description
GET /api/admin/applications View all applications
GET /api/admin/jobs/{id}/applications Filter applications by job ID
GET /api/admin/applications/{application}/accept Accept an application (send email)

👩‍💻 User - Job Browsing

Method Endpoint Description
GET /api/user/jobs List all active jobs
GET /api/user/jobs/{job} Show specific job
GET /api/user/jobs/filter Filter jobs

📝 User - Job Applications

Method Endpoint Description
POST /api/user/jobs/{job}/apply Apply for a job
GET /api/user/applications List my applications
GET /api/user/applications/{id} View specific application
DELETE /api/user/applications/{id} Delete application

🧪 Running Tests

php artisan test


🧾 Logs

Every job update is logged for audit purposes. Example (in storage/logs/application.log):

[2025-07-21 12:13:39] local.INFO: Status updated successfully! {"old_status":"inactive","updated_status":"active"}

📖 API Documentation

You can explore and test all endpoints using the Postman collection provided.

🧭 Access it in two ways:

  1. 🌐 Online via Postman link:
    Open in Postman Workspace

  2. 📁 Locally in the project:
    Navigate to docs/Job Manager.postman_collection.json and import it manually into Postman.


🖼️ Screenshots

🔐 Postman Token Variables

Used to authorize admin/user requests easily in the collection. token_variables


✉️ Email Notification Preview

Example email sent to a user when their job application is accepted. email


✅ Test Results

Snapshot from running php artisan test showing successful feature tests. test_result


📬 Contact

Developed by Tasnim Alshair

📫 Email: [email protected]
🔗 GitHub: github.com/tasnimalshair
🔗 LinkedIn: linkedin.com/in/tasnim-alshair-aa11a4266
📸 Instagram: instagram.com/dev.tasnimalshair

Feel free to reach out for collaborations, questions, or just to say hi!

About

A Laravel 12 RESTful API for managing job postings and applications. Built with scalability and clean code practices in mind, including authentication, form validation, automated notifications, and background job processing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages