Welcome to the Content Sharing Network! This application allows users to store and access their content, currently focusing on images.
- User authentication using JWT.
- Store and retrieve images.
- PostgreSQL database for storing user and image metadata.
- SeaweedFS for image storage.
- Pragmatic functional programming approach using Kotlin and ArrowKt.
- Kotlin: Programming language.
- Ktor: Framework for building asynchronous servers and clients.
- Exposed: ORM framework for Kotlin.
- ArrowKt: Library for functional programming in Kotlin.
- PostgreSQL: Relational database for storing metadata.
- SeaweedFS: Distributed file system for storing images.
The application is built using the Ktor framework in a pragmatic functional style with the help of the ArrowKt library. It uses Exposed ORM for database interactions and integrates with PostgreSQL for metadata storage and SeaweedFS for image storage.
Before running the application, ensure that you have the following installed:
- Podman
- Docker Compose (Podman Compose)
- Gradle
Clone the repository:
git clone https://github.com/karlobratko/instakt
cd instaktTo set up the development environment, follow these steps:
-
Start the development environment using Podman Compose:
podman compose -f containers/compose.dev.yml up -d
-
Run the application in development mode using Gradle:
./gradlew :app:runDevelopment
Alternatively, you can use the provided Makefile to simplify these steps:
make devTo clean up the environment, use the following commands:
podman compose -f containers/compose.dev.yml down
podman volume prune -fOr use the Makefile:
make cleanOnce the application is running, you can interact with it through its API. The API supports operations such as user authentication, image upload, and retrieval. JWT is used for securing endpoints, so make sure to include the JWT token in the authorization headers of your requests. Examples of endpoint interactions are visible in resources/requests folder.
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
This project is licensed under the MIT License. See the LICENSE file for details.