Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
8880c2a
Merge pull request #32 from lamisplus/dev
mathewade Jun 9, 2024
2b349a1
Merge pull request #35 from lamisplus/dev
mathewade Jul 12, 2024
b0a77e1
Fix - Updated token validation to fix empty permission bug, updated t…
peterabiodun Jan 8, 2025
7411303
Update README.md
AJ-DataFI Mar 13, 2025
6f5bc83
Merge pull request #38 from lamisplus/AJ-DataFI-patch-1
AJ-DataFI Mar 14, 2025
eaed9ed
Update README.md
AJ-DataFI Mar 14, 2025
d78d215
Merge pull request #39 from lamisplus/AJ-DataFI-patch-1
AJ-DataFI Mar 14, 2025
a70d1c4
[core] optimize the application codesets api
AJ-DataFI May 22, 2025
c753d4e
Removed log on role service, added user permission to Token Provider …
peterabiodun May 26, 2025
5602be1
Merge branch 'dev-backend' of https://github.com/lamisplus/Core into …
peterabiodun May 26, 2025
081b3ad
safekeep
peterabiodun Jul 16, 2025
c6e2f7f
search organisations
peterabiodun Jul 30, 2025
1e4b186
Feat: Created chart entity, controller and service for the core dashb…
EMEKADATAFI Jul 30, 2025
e14dac9
Feat: API to getChartIndicator By Location using result set & raw query
EMEKADATAFI Jul 30, 2025
54530a7
Feat: Added tableName variable to ChartDTO
EMEKADATAFI Jul 30, 2025
54b6869
Feat: Update endpoint with more variables
EMEKADATAFI Jul 30, 2025
906e947
Fix: modified API and method to return an object instead of list
EMEKADATAFI Jul 31, 2025
0df4fe6
Feat: Spring boot Cache implemented for fast response time
EMEKADATAFI Jul 31, 2025
8d6b4c5
feature: dynamic dashboard charts frontend
peterabiodun Jul 31, 2025
58c6ff0
Feat: Added facility id to API and query
EMEKADATAFI Aug 1, 2025
1cee8a4
Merge remote-tracking branch 'origin/modules_chart' into modules_chart
EMEKADATAFI Aug 1, 2025
71b6c54
feature: sort charts by position, cache defaults
peterabiodun Aug 1, 2025
2c35091
feature: implemented exists check for chart tables
peterabiodun Aug 1, 2025
24203ea
feature: implemented exists check for chart tables
peterabiodun Aug 1, 2025
147d80e
add a script to create RDE role with menu, and permissions
joshuagabriel-datafi Aug 19, 2025
2b17f51
added the versions
joshuagabriel-datafi Aug 19, 2025
901ac4b
update to codeset
AJ-DataFI Aug 19, 2025
da986c3
Merge remote-tracking branch 'origin/dev-backend' into dev-backend
AJ-DataFI Aug 19, 2025
a7ac215
limit persmissions to base persmissions
joshuagabriel-datafi Aug 19, 2025
a71c2fc
Merge branch 'optimized-core' of https://github.com/lamisplus/Core in…
peterabiodun Aug 19, 2025
d237b2e
Merge branch 'optimized-core' of https://github.com/lamisplus/Core in…
AJ-DataFI Aug 19, 2025
12196b8
remove archived from lastRole id
joshuagabriel-datafi Aug 20, 2025
4c401bd
exclude certain menu for RDE userRole
joshuagabriel-datafi Aug 20, 2025
22e4d80
Merge branch 'optimized-core' of https://github.com/lamisplus/Core in…
peterabiodun Aug 20, 2025
a30ef1c
Feat: Implemented multiple cache for app
EMEKADATAFI Aug 25, 2025
7382eef
Merge remote-tracking branch 'origin/modules_chart' into modules_chart
EMEKADATAFI Aug 25, 2025
7ab9238
Merge remote-tracking branch 'public/modules_chart' into modules_chart
peterabiodun Aug 25, 2025
0ca525b
Merge branch 'dev-backend' of https://github.com/lamisplus/Core into …
peterabiodun Sep 1, 2025
78ea791
feat: backend crud operations for dynamic charts
peterabiodun Sep 3, 2025
1c4439c
Merge https://github.com/lamisplus/Core into modules_chart
emmannajichi Sep 4, 2025
931038e
Merge branch 'modules_chart' of https://github.com/lamisplus/Core int…
emmannajichi Sep 4, 2025
0a3f1a0
feature:added and endpoint to get charts data
TyavBarnabas2 Sep 9, 2025
7bb8ead
started adding chart configuration
emmannajichi Sep 9, 2025
69729d4
added files to gitignore
emmannajichi Sep 9, 2025
3494b7f
Stop tracking db-config.yml
emmannajichi Sep 9, 2025
2b7dcf7
Merge branch 'modules_chart' of https://github.com/lamisplus/Core int…
emmannajichi Sep 9, 2025
4910d0a
fix: renamed an api
TyavBarnabas2 Sep 9, 2025
7cb5050
Merge remote-tracking branch 'origin/modules_chart' into modules_chart
TyavBarnabas2 Sep 9, 2025
8a8cd07
refactor on home dashboard ongoing
emmannajichi Sep 9, 2025
6a80d97
Merge branch 'modules_chart' of https://github.com/lamisplus/Core int…
emmannajichi Sep 9, 2025
24f578f
safekeep
peterabiodun Sep 10, 2025
7096b35
safekeep
peterabiodun Sep 10, 2025
816148e
Feat: added get all charts API
peterabiodun Sep 10, 2025
f8d32cd
Merge remote-tracking branch 'public/modules_chart' into modules_chart
peterabiodun Sep 10, 2025
e964108
Feat: started integrating exclude roles in user registration
peterabiodun Sep 11, 2025
8de4532
done developing the chart edit, delete, import and export functionali…
emmannajichi Sep 11, 2025
dde767d
minor adjustment to buttons
emmannajichi Sep 11, 2025
1dec933
update:aaded liquid base query to insert chart config into base_menu …
TyavBarnabas2 Sep 11, 2025
aba5dce
minor change
emmannajichi Sep 11, 2025
367725f
Merge branch 'modules_chart' of https://github.com/lamisplus/Core int…
emmannajichi Sep 11, 2025
b795fcb
fixes:added method to process card and liquid base queries
TyavBarnabas2 Sep 15, 2025
e94a361
minor updates to changeset
emmannajichi Sep 15, 2025
0e6f5b1
Merge remote-tracking branch 'origin/modules_chart' into modules_chart
TyavBarnabas2 Sep 15, 2025
56626e5
LV3-128: Ensure Admin can't pass any excluded roles
peterabiodun Sep 10, 2025
c686a1d
fixes:made some fixes to the return type
TyavBarnabas2 Sep 15, 2025
5d1d97f
Merge remote-tracking branch 'origin/LV3-126' into LV3-126
peterabiodun Sep 16, 2025
c9dd852
Merge remote-tracking branch 'public/modules_chart' into LV3-126
peterabiodun Sep 16, 2025
c877cf5
Charts updated
peterabiodun Sep 24, 2025
c2c1ca1
fixes:new changes
TyavBarnabas2 Sep 24, 2025
e0f0178
made sections of charts come together as against being on their seper…
emmannajichi Oct 2, 2025
54b0f1a
Charts updated
peterabiodun Oct 22, 2025
fe80c4c
fixes:made changes to chart queries to fit values gotten from the report
TyavBarnabas2 Nov 12, 2025
74b557f
Merge branch 'LV3-126' of https://github.com/lamisplus/Core into LV3-126
TyavBarnabas2 Nov 12, 2025
88ffc89
Merge branch 'new-stable-branch' into dashchart-branch
TyavBarnabas2 Nov 12, 2025
3fe68ba
fixes:latest fix on chart
TyavBarnabas2 Nov 13, 2025
f931f40
fixes:latest fix on chart
TyavBarnabas2 Dec 8, 2025
c03f434
fixes:increase the installer
TyavBarnabas2 Dec 9, 2025
43e07be
Version numbers updated
peterabiodun Dec 11, 2025
f694f43
fixes:increase the installer
TyavBarnabas2 Dec 12, 2025
9aa1e31
Merge remote-tracking branch 'origin/dashchart-branch' into dashchart…
TyavBarnabas2 Dec 12, 2025
8b3ad35
fixed schema issue
peterabiodun Feb 10, 2026
8d544bd
removed caching feature on users
peterabiodun Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
### Java template
*.class

db-config.yml
package-lock.json
# BlueJ files
*.ctxt

Expand Down Expand Up @@ -37,4 +39,5 @@ node_modules
starter-module/src/main/resources/static/*
starter-module/build/*
starter-module/node/*
base-module/node/*
base-module/node/*
db-config.yml
100 changes: 75 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,84 @@
# lamisplus-core-enhancement application
# Run with java version 8.
## Setting up the database
This application uses `postgres` database; create a database on postgres
and set up the database credentials in the application.yml in lamisplus module
# LAMISPlus 2.0

## Maven setup
Use maven 3 upwards, run **mvn dependency:tree** to resolve java dependencies
## System Requirements

## Starting the website on your local machine
Just start `coreApplication` with the command **mvn spring-boot:run**.
This will start up the website using a local database on port **8080**. or another user defined port.
### Prerequisites to Install
- IDE of choice (IntelliJ, Eclipse, etc.)
- Java 8+
- PostgreSQL 14+
- `.m2` folder from Google Drive https://drive.google.com/file/d/17F6wHPADVVaDBabajrM9wABUeB04i6D1/view?usp=sharing

Browsing to http://localhost:8080/login should give you the homepage.
## Run in Development Environment

## Front-end development
When starting on your local machine, you should get instant reloading of all static files.
Simply make a change and refresh the page in your browser.
### How to Install Dependencies
1. Install Java 8+
2. Install PostgreSQL 14+
3. Download and replace the system `.m2` folder.
4. Clone the git repository:
```bash
git clone https://github.com/lamisplus/Core.git
```
5. Open the project in your IDE of choice.

All front-end related static files are located in `lamisplus/src/main/resources/static`.
### Update Configuration File
1. Update database access details in `db-config.yml` file.
2. Update other Maven application properties as required.

> WARNING: All files in `src/main/resources` will be packaged and deployed with the website.
> Do not put any files anywhere in that folder if they are not supposed to be deployed!
### Run Build and Install Commands
1. Change the directory to `starter-module`:
```bash
cd starter-module
```
2. Run Frontend Build Command:
```bash
npm run build
```
3. Run Maven clean install:
```bash
mvn clean install
```

### LiveReload integration
The application supports LiveReload.
If you have the plugin in your browser, just activating it on the site should be enough.
## How to Package for Production Environment
1. Run Maven package command:
```bash
mvn clean package
```

### Front end system
The application is built using react native for frontend.
## Launch Packaged JAR File
1. Launch the JAR file:
```bash
java -jar <path-to-jar-file>
```
2. Optionally, run with memory allocation:
```bash
java -jar -Xms4096M -Xmx6144M <path-to-jar-file>
```

## Troubleshooting
### Resetting the database
Create a database property in the application.yml
## Visit the Application
- Visit the application on a browser at the configured port:
```
http://localhost:8080
```

## Access Swagger Documentation
- Visit the application at:
```
http://localhost:8080/swagger-ui.html#/
```

## Access Application Logs
- Application logs can be accessed in the `application-debug` folder.

## Authors & Acknowledgments
### Main contributors
- Victor Ajor https://github.com/AJ-DataFI
- Mathew Adegbite https://github.com/mathewade
- Emeka https://github.com/drjavanew
- Abisayo Peter Abiodun https://github.com/Asquarep
- John gichangi https://github.com/gichangi
- Joshua https://github.com/JOSH2019GABRIEL
- Kennedy Kirui https://github.com/kenkirui
- Tyav Barnabas https://github.com/tyavbarnabas

### Special mentions
- Dr Karim Usman https://github.com/drkusman
15 changes: 15 additions & 0 deletions base-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,21 @@
<artifactId>zip4j</artifactId>
<version>2.11.5</version>
</dependency>
<!-- Caching Dependencies -->
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.10.8</version>
</dependency>
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public class OtherStartupRunners {
@PostConstruct
public void checkForUpdates() {
LOG.info("Calling Module Update Service");
moduleUpdateService.checkForUpdates();
//moduleUpdateService.checkForUpdates();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package org.lamisplus.modules.base.configurer;

import org.ehcache.config.CacheConfiguration;
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.ExpiryPolicyBuilder;
import org.ehcache.config.builders.ResourcePoolsBuilder;
import org.ehcache.config.units.MemoryUnit;
import org.ehcache.core.config.DefaultConfiguration;
import org.ehcache.expiry.ExpiryPolicy;
import org.ehcache.jsr107.EhcacheCachingProvider;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.jcache.JCacheCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.cache.Caching;
import java.time.Duration;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Configuration
//@EnableCaching
public class CacheConfig {
@Value("${cache.names:core,module,server_sync,user}")
private List<String> cacheNames;

@Value("${cache.heap.size:100}")
private int heapSize;

@Value("${cache.offheap.size:50}")
private int offheapSize;

@Value("${cache.offheap.unit:MB}")
private String offheapUnit;

@Value("${cache.expiry.ttl.minutes:1}")
private int ttlMinutes;

@Value("${cache.expiry.idle.minutes:1}")
private int idleMinutes;

@Bean
public CacheManager jCacheCacheManager() {
Map<String, CacheConfiguration<?, ?>> cacheMap = new HashMap<>();

// Configure each cache from properties (both explicit configs and names list)
cacheNames.forEach(cacheName -> {
ResourcePoolsBuilder resourcePoolsBuilder = ResourcePoolsBuilder
.heap(heapSize)
.offheap(offheapSize, MemoryUnit.valueOf(offheapUnit));

ExpiryPolicy<Object, Object> expiryPolicy = createExpiryPolicy(
Duration.ofMinutes(ttlMinutes),
Duration.ofMinutes(idleMinutes)
);

CacheConfiguration<Object, Object> cacheConfiguration = CacheConfigurationBuilder
.newCacheConfigurationBuilder(Object.class, Object.class, resourcePoolsBuilder)
.withExpiry(expiryPolicy)
.build();

cacheMap.put(cacheName.trim(), cacheConfiguration);
});

EhcacheCachingProvider ehcacheCachingProvider =
(EhcacheCachingProvider) Caching.getCachingProvider(EhcacheCachingProvider.class.getName());

DefaultConfiguration defaultConfiguration =
new DefaultConfiguration(cacheMap, ehcacheCachingProvider.getDefaultClassLoader());

javax.cache.CacheManager cacheManager =
ehcacheCachingProvider.getCacheManager(ehcacheCachingProvider.getDefaultURI(), defaultConfiguration);

return new JCacheCacheManager(cacheManager);
}

private static ExpiryPolicy<Object, Object> createExpiryPolicy(Duration timeToLive, Duration timeToIdle) {
return ExpiryPolicyBuilder
.expiry()
.create(timeToLive)
.access(timeToIdle)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {

@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
config.enableSimpleBroker("/topic");
config.setApplicationDestinationPrefixes("/topic");
}

@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/websocket")
.setAllowedOrigins("*")
.withSockJS();
}

@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
config.setApplicationDestinationPrefixes("/app");
config.enableSimpleBroker("/topic");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.lamisplus.modules.base.domain.dto.ApplicationCodesetDTO;
import org.lamisplus.modules.base.domain.dto.CodeSetDTO;
import org.lamisplus.modules.base.domain.entities.ApplicationCodeSet;
import org.lamisplus.modules.base.service.ApplicationCodesetService;
import org.springframework.http.HttpStatus;
Expand All @@ -16,6 +17,7 @@
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import java.util.Map;

@RestController
@Slf4j
Expand Down Expand Up @@ -107,4 +109,11 @@ public ResponseEntity<String> uploadCodesetFile(@RequestParam("file") MultipartF
throw new RuntimeException("Error occurred while processing the file: " + e.getMessage());
}
}

@GetMapping(BASE_URL_VERSION_ONE+ "/v2/codeSets")
public ResponseEntity<Map<String, List<CodeSetDTO>>> getCodeSets(
@RequestParam List<String> codes
){
return ResponseEntity.ok(applicationCodesetService.getMultipleCodeSets(codes));
}
}
Loading