| runme | ||||
|---|---|---|---|---|
|
Cats Social is an app that allows cat owners to match their cats with each other.
Cats Social offers the following features:
-
Authentication:
-
User registration
-
User login
-
Cat Management (CRUD):
-
Create new cat profiles
-
View existing cat profiles
-
Update cat profiles
-
Delete cat profiles
-
Matching:
-
Match your cat with other cats
-
View matching cats
-
Approve or reject matches
-
Delete matches
Before running this app make sure you have this installed on your puter :
To run the application, follow these steps before run the program:
-
Make sure you have Golang, PostgreSQL, and Golang Migrate installed and configured on your system.
-
Clone this repository:
git clone https://github.com/sedelinggam/cats-social.git
- Navigate to the project directory:
cd cats-social
- Run the following command to install dependencies:
go mod download
- Run the following command to create environment for the application:
mv .env.sample .env
- Setting Up Environment Variables
Before starting the application, you need to set up the following environment variables:
-
DB_NAME: Name of your PostgreSQL database -
DB_PORT: Port of your PostgreSQL database (default: 5432) -
DB_HOST: Hostname or IP address of your PostgreSQL server -
DB_USERNAME: Username for your PostgreSQL database -
DB_PASSWORD: Password for your PostgreSQL database -
DB_PARAMS: Additional connection parameters for PostgreSQL (e.g., sslmode=disabled) -
JWT_SECRET: Secret key used for generating JSON Web Tokens (JWT) -
BCRYPT_SALT: Salt for password hashing (use a higher value than 8 in production!)
- Database Migrations
- Apply migrations to the database:
make migrate-dev
- Running the Application
make run
You can access the application in your web browser at http://localhost:8080