Publicity Management System
A Publicity Management System built with Java Spring Boot, Maven, and PostgreSQL. This project is a submodule of a larger cultural fest management system, designed to manage advertisements and campaigns effectively. It provides APIs to create, update, retrieve, and delete data for advertisements and campaigns.
Manage Advertisements with details such as name, platform, and budget.
Handle Campaigns including title, description, start date, and end date.
RESTful APIs for CRUD operations.
PostgreSQL integration for data persistence.
Java : Programming language.
Spring Boot : Framework for building RESTful APIs.
Maven : Dependency and build management.
PostgreSQL : Relational database.
Postman : API testing.
Column
Type
Description
id
Long
Auto-generated ID.
name
String
Name of the advertisement.
platform
String
Platform for the ad.
budget
Double
Advertisement budget.
Column
Type
Description
id
Long
Auto-generated ID.
title
String
Campaign title.
description
String
Campaign details.
startDate
Date
Campaign start date.
endDate
Date
Campaign end date.
⚙️ Setup and Installation
Install Java 17 or higher.
Install PostgreSQL and set up a database.
Install Maven .
Clone the repository and navigate into the project:
git clone https://github.com/your-username/publicity-management.git
cd publicity-management
Configure the database:
Update src/main/resources/application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/your_database
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
Build and run the project:
mvn clean install
mvn spring-boot:run
Access the application:
Base URL: http://localhost:8080
Method
Endpoint
Description
GET
/api/advertisements
Retrieve all ads.
POST
/api/advertisements
Create a new ad.
GET
/api/advertisements/{id}
Retrieve ad by ID.
PUT
/api/advertisements/{id}
Update an ad.
DELETE
/api/advertisements/{id}
Delete an ad.
Method
Endpoint
Description
GET
/api/campaigns
Retrieve all campaigns.
POST
/api/campaigns
Create a new campaign.
GET
/api/campaigns/{id}
Retrieve campaign by ID.
PUT
/api/campaigns/{id}
Update a campaign.
DELETE
/api/campaigns/{id}
Delete a campaign.
Add Advertisements:
Method: POST
URL: http://localhost:8080/api/advertisements
Body:
{
" name" : " Social Media Ad" ,
" platform" : " Instagram" ,
" budget" : 1000.00
}
Retrieve Campaigns:
Method: GET
URL: http://localhost:8080/api/campaigns
Follow similar steps for other endpoints.
Contributions are welcome! To contribute:
Fork the repository.
Create a new branch: git checkout -b feature/your-feature.
Make your changes and commit them: git commit -m 'Add some feature'.
Push to the branch: git push origin feature/your-feature.
Submit a pull request.