diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..0c3e74b --- /dev/null +++ b/.env.example @@ -0,0 +1,34 @@ +# =========================== +# Application Configuration +# =========================== + +APP_HOST_NAME=localhost + +# =========================== +# GitHub API +# =========================== + +GithubBearer= + +# =========================== +# IPInfo +# =========================== + +IP_INFO_TOKEN= +IP_INFO_CACHE_SIZE=1000 + +# =========================== +# Email +# =========================== + +EMAIL_USERNAME= +EMAIL_PASSWORD= + +# =========================== +# Feature Flags +# =========================== + +AUTO_UPLOAD_ENABLED=true +AUTO_UPLOAD_META_ENABLED=true +FEED_GENERATION_ENABLED=true +REQUEST_LOGGING_ENABLED=true \ No newline at end of file diff --git a/README.md b/README.md index b125937..2b99acd 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ YAGFI - yet another good first issue * [Introduction](#introduction) * [Why yet another good-first-issue project?](#why-yet-another-good-first-issue-project) * [Implementation](#implementation) + * [Local Deployment](#local-development) * [Frontend](#frontend) * [What's next](#whats-next) @@ -45,6 +46,35 @@ To compare with, look for other similar projects: - The list of current supported issues is [here](https://github.com/Regyl/yagfi-back/blob/master/src/main/resources/data/labels.txt) - See [CONTRIBUTING](https://github.com/Regyl/yagfi-back/tree/master/docs/CONTRUBUTING.md) if you found some unsupported labels + + ## Local Development + +### Prerequisites + +- Java 25 +- Maven +- PostgreSQL +- Git + +### Environment Variables + +Create a `.env` file based on `.env.example`. + +The following variables are required: + +| Variable | Description | +|----------|-------------| +| APP_HOST_NAME | PostgreSQL host | +| GithubBearer | GitHub Personal Access Token | +| IP_INFO_TOKEN | API token from ipinfo.io | +| EMAIL_USERNAME | SMTP username | +| EMAIL_PASSWORD | SMTP password | + +### PostgreSQL + +The application connects to PostgreSQL using + + ## Frontend Frontend for this project is placed [here](https://github.com/Regyl/yagfi-front). Yes, it's vibe-coded. Just because firstly I am a backend developer. See [CONTRIBUTING](https://github.com/Regyl/yagfi-back/tree/master/docs/CONTRUBUTING.md) diff --git a/docs/LOCAL_SETUP.md b/docs/LOCAL_SETUP.md new file mode 100644 index 0000000..55df5f6 --- /dev/null +++ b/docs/LOCAL_SETUP.md @@ -0,0 +1,37 @@ +# Local Development Guide + +## 1. Clone + +git clone https://github.com/Regyl/yagfi-back.git + +## 2. Install + +- Java 25 +- Maven +- PostgreSQL + +## 3. Configure Environment Variables + +Copy + +.env.example + +to + +.env + +and fill all required values. + +## 4. Database + +Create database + +uj + +Create schema + +gfi + +## 5. Start + +mvn spring-boot:run diff --git a/pom.xml b/pom.xml index 2a04656..73a92f4 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 3.5.1 3.3.1 - 25 + 21 ${java.version} ${java.version} UTF-8 @@ -243,18 +243,20 @@ - - org.springframework.boot - spring-boot-maven-plugin - - - - org.projectlombok - lombok - - - - + + org.springframework.boot + spring-boot-maven-plugin + + com.github.regyl.gfi.YagfiApplication + + + + org.projectlombok + lombok + + + + org.apache.maven.plugins diff --git a/src/main/java/com/github/regyl/gfi/YagfiApplication.java b/src/main/java/com/github/regyl/gfi/YagfiApplication.java index 67ba3fd..aba88c2 100644 --- a/src/main/java/com/github/regyl/gfi/YagfiApplication.java +++ b/src/main/java/com/github/regyl/gfi/YagfiApplication.java @@ -8,8 +8,8 @@ @ConfigurationPropertiesScan(basePackages = "com.github.regyl.gfi.configuration") public class YagfiApplication { - static void main(String[] args) { + public static void main(String[] args) { SpringApplication.run(YagfiApplication.class, args); } -} +} \ No newline at end of file