{"id":28410964,"url":"https://github.com/nikollbibajnoah/fullstackapplication","last_synced_at":"2026-04-12T12:36:46.409Z","repository":{"id":275955583,"uuid":"927731600","full_name":"NikollbibajNoah/Fullstackapplication","owner":"NikollbibajNoah","description":"Very basic fullstack application created with java spring boot as backend, react/typescript as frontend and mongodb","archived":false,"fork":false,"pushed_at":"2025-03-14T09:45:21.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T08:42:20.470Z","etag":null,"topics":["backend","frontend","fullstack","java","javaspringboot","mongodb","react","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NikollbibajNoah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T13:02:16.000Z","updated_at":"2025-05-20T16:52:50.000Z","dependencies_parsed_at":"2025-02-05T14:19:45.341Z","dependency_job_id":"e0cf6529-2b5c-46d4-845a-43f5c004da54","html_url":"https://github.com/NikollbibajNoah/Fullstackapplication","commit_stats":null,"previous_names":["nikollbibajnoah/fullstackapplication"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NikollbibajNoah/Fullstackapplication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikollbibajNoah%2FFullstackapplication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikollbibajNoah%2FFullstackapplication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikollbibajNoah%2FFullstackapplication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikollbibajNoah%2FFullstackapplication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NikollbibajNoah","download_url":"https://codeload.github.com/NikollbibajNoah/Fullstackapplication/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikollbibajNoah%2FFullstackapplication/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267468344,"owners_count":24092327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","frontend","fullstack","java","javaspringboot","mongodb","react","typescript"],"created_at":"2025-06-02T13:12:46.945Z","updated_at":"2026-04-12T12:36:41.373Z","avatar_url":"https://github.com/NikollbibajNoah.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fullstackapplication\nThis is a full-stack application built using Java Spring for the backend and a modern JavaScript framework for the frontend. It demonstrates the integration of a RESTful API with a dynamic user interface, providing a comprehensive example of a full-stack development project.\n\n## Tools\nIn this project, we utilize a variety of tools to streamline development and ensure a robust application:\n\n- **Java Spring**: A powerful framework for building enterprise-grade backend services. A REST Controller for all listings, fetched from external database.\n- **React TypeScript**: For the frontend react is being used for full powerful controll over the user interface. The UI library **Primereact** is being used in this project, to use ready made components.\n- **MongoDB**: For storing data in this project, mongodb is used for its easy and free usage.\n\nThese tools collectively enhance productivity, maintainability, and scalability of the application.\n\n## Database Connection\nTo connect to the MongoDB database, follow these steps:\n\n1. **Configure MongoDB URI**: In your `application.properties` or `application.yml` file, add the MongoDB connection string.\n    ```properties\n    spring.data.mongodb.uri=mongodb://localhost:27017/fullstackapplication\n    ```\n\n2. **Create a Entity**: Define a entity class to set up MongoDB properties. The `@Document()` Annotation is used for the table in the database.\n    ```java\n    package dev.backend.backend;\n\n    import java.util.Date;\n\n    import org.springframework.data.annotation.Id;\n    import org.springframework.data.mongodb.core.mapping.Document;\n\n    import lombok.AllArgsConstructor;\n    import lombok.Data;\n    import lombok.NoArgsConstructor;\n\n    @Data\n    @AllArgsConstructor\n    @NoArgsConstructor\n    @Document(collection = \"listingsAndReviews\")\n    public class Listing {\n        \n        @Id\n        private String id;\n        private String name;\n        private String description;\n        private double price;\n        private Date last_scraped;\n        private Images images;\n\n        @Data\n        @AllArgsConstructor\n        @NoArgsConstructor\n        public static class Images {\n            private String thumbnail_url;\n            private String medium_url;\n            private String picture_url;\n            private String xl_picture_url;\n        }\n    }\n    ```\n\n3. **Define MongoDB Repositories**: Create repository interfaces for your entities.\n    ```java\n    import org.springframework.data.mongodb.repository.MongoRepository;\n    import org.springframework.stereotype.Repository;\n\n    @Repository\n    public interface ListingRepository extends MongoRepository\u003cListing, String\u003e {}\n    ```\n\n4. **Use Repositories in Services**: Autowire the repositories in your service classes to perform CRUD operations.\n    ```java\n    import java.util.List;\n    import java.util.Optional;\n\n    import org.springframework.beans.factory.annotation.Autowired;\n    import org.springframework.data.domain.PageRequest;\n    import org.springframework.data.domain.Pageable;\n    import org.springframework.stereotype.Service;\n\n    @Service\n    public class ListingService {\n        \n        @Autowired\n        private ListingRepository listingRepository;\n\n        public List\u003cListing\u003e getListings() {\n            Pageable pageable = PageRequest.of(0, 5);\n\n            return listingRepository.findAll(pageable).getContent();\n        }\n\n        public Optional\u003cListing\u003e getListingById(String id) {\n            return listingRepository.findById(id);\n        }\n\n        // CRUD methods here\n    }\n    ```\n    \n4. **Create a REST Controller**: For work with the data in the react frontend, create a REST Controller with the methods.\n\n    ```java\n    import java.util.List;\n    import java.util.Optional;\n\n    import org.springframework.beans.factory.annotation.Autowired;\n    import org.springframework.http.HttpStatus;\n    import org.springframework.http.ResponseEntity;\n    import org.springframework.web.bind.annotation.CrossOrigin;\n    import org.springframework.web.bind.annotation.GetMapping;\n    import org.springframework.web.bind.annotation.PathVariable;\n    import org.springframework.web.bind.annotation.RequestMapping;\n    import org.springframework.web.bind.annotation.RestController;\n\n    @RestController\n    @RequestMapping(\"/listings\")\n    @CrossOrigin\n    public class ListingController {\n        \n        @Autowired\n        private ListingService listingService;\n\n        @GetMapping\n        public ResponseEntity\u003cList\u003cListing\u003e\u003e getListings() {\n            return new ResponseEntity\u003cList\u003cListing\u003e\u003e(listingService.getListings(), HttpStatus.OK);\n        }\n\n        @GetMapping(\"/{id}\")\n        public ResponseEntity\u003cOptional\u003cListing\u003e\u003e getListingById(@PathVariable String id) {\n            return new ResponseEntity\u003cOptional\u003cListing\u003e\u003e(listingService.getListingById(id), HttpStatus.OK);\n        }\n    }\n    ```\n\nBy following these steps, you can establish a connection to your MongoDB database and perform operations using Spring Data MongoDB.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikollbibajnoah%2Ffullstackapplication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikollbibajnoah%2Ffullstackapplication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikollbibajnoah%2Ffullstackapplication/lists"}