This project is an eCommerce API built in Kotlin using the Ktor framework. It provides various endpoints and features to support an eCommerce platform.
- User authentication and authorization using JWT (JSON Web Tokens)
- CORS (Cross-Origin Resource Sharing) enabled to allow cross-origin requests
- Serialization and deserialization of JSON using Gson
- Routing and request handling for different API endpoints
- Integration with various controllers for handling business logic
To get started with the project, follow these steps:
- Clone the repository:
git clone <repository-url>
- Install Kotlin and its dependencies (if not already installed)
- Build the project:
gradle clean build
- Run the project:
gradle run
Make sure to configure any necessary environment variables, database connections, or other settings as per your requirements.
-
Create a MySQL database with the following credentials:
- Host:
localhost
- Port:
3306
- Database Name:
fcs
- Username:
root
- Password:
12345678
- Host:
-
Run the
initial.sql
script provided in the project to set up the initial database schema and data.
The API provides various endpoints for different functionalities. You can access the API documentation and test the endpoints using Postman by clicking the button below:
Please refer to the source code for detailed request/response structures and additional endpoints.
The project uses the following dependencies:
- Ktor: Core framework for building web applications in Kotlin
- JWT: Library for handling JSON Web Tokens for user authentication
- Gson: Library for serializing and deserializing JSON objects
Make sure to check the build.gradle
file for the complete list of dependencies and their versions.