This is a web application for managing and tracking lithium-ion cells through various testing stages and then building them into battery packs.
It is a vital tool when building batteries from recycled cells where the individual cell characteristics are varied.
It helps to collect the cell data efficiently and then uses algorithms to calculate and balance the desired battery bank based on the available cell voltage, internal resistance, and capacity.
- Multi-stage Cell Entry: Enter cell data through sequential stages (initial specs, charge voltage, capacity, recharge, 7-day testing)
- Bulk Data Entry: Quick entry of multiple cells with "Save and Next" functionality
- Flexible Editing: Edit individual cells through stages or use bulk edit mode for multiple cells
- Data Persistence: All data saved as JSON files on the server
- Authentication: Cookie-based login for security
- Export/Import: Export all data to JSONL format, import to merge data
- Filtering: Filter cells by testing stage or bank
- Status Tracking: Automatic status updates based on completion stage and battery usage
- Battery Builder: Intelligent pack assembly with balancing and stats
- Docker and Docker Compose
- Web browser
I am building a new lithium battery pack for my e-scooter and I am using second-hand lithium cells. Reclaimed cells offer excellent value for money but they also vary a from one to the next because every cell ages in it's own way.
When building battery packs with second-hand cells, it is important to combine the cells carefully to ensure the best reliability and longevity of the battery pack.
The battery builder lets you type in the desired series and parallel configuration, then you can select from the available cells and drag/drop them into the series groups to achieve a well-balanced pack.
- Bank Filter: Select bank or all for available cells.
- S/P Configuration: Specify series/parallel count.
- Available Cells: Lists tested, unused cells sorted by capacity desc, IR asc.
- Intelligent Build:
- Adaptive capacity filter (±1.5σ from mean).
- IR <80mΩ.
- Least-loaded greedy assignment to balance series groups by total mWh.
- Parallel effective IR (harmonic mean).
- Imbalance % (max-min / min *100), warning if >3%.
- Manual Selection: Checkbox select cells.
- Preview: Group stats, grid layout, pack energy limited by weakest group.
- Save: Marks cells stage=5 "In Battery (name)", saves groups for reload.
- Delete: Frees cells (stage=4), deletes battery.
There is an auto arrange function and an "Intelligent Build" mode too!
I am using a battery cell tester like this one:
Each cell is already numbered with a unique id. I first test the voltage and internal resistance. These are entered into the form when I click the "Add new" button.
I then charge each cell to full capacity and I click to edit the cell, and I record the voltage of the cell after it has been charged.
I then set the test mode to discharge and I let it run the battery down until it reaches the cutoff voltage. I then click to edit the cell details again and I record: milliamps capacity, milliwatts capacity and the cell voltage at rest after having been fully discharged.
I then recharge the cell to full and again edit the cell to record the voltage after recharge.
I then let the cell rest for 7 days before recording the voltage and Internal Resistance again. This can help to identify faulty cells that would eventually destroy a battery pack.
Those are the five stages of testing and they are labeled as such:
- New: Initial entry (cell number, voltage, IR)
- Testing: First charge voltage entered
- Charging: Capacity data (mAh, mWh, flat voltage) entered
- On hold: Recharge voltage entered
- Tested: 7-day voltage and IR entered
Saved batteries listed with summary stats, expandable groups with mini-grid.
- Clone or download this repository
- Navigate to the
cell-appdirectory - Copy
.env.exampleto.envand set your password:PASSWORD=yourpassword - Run
docker-compose up --build
The app will be available at http://localhost:3000
- In
.env: AddTEST_PASSWORD=test(same asPASSWORDfor simplicity) cd cell-app && docker-compose up --build(in separate terminal)cd cell-app && npm run test:e2e- View
test-results/html/index.html
Run before commits to catch UI regressions.
- Open
http://localhost:3000in your browser - You'll be redirected to the login page
- Enter the password you have defined in .env
- Click "Login"
- Click "Add New Cell"
- Enter cell number, first voltage, and internal resistance
- Click "Save and Next" to add another cell, or "Save" to finish
- Click on any cell in the list to open the edit form
- Navigate through stages using "Save" (next stage) or "Save and Next" (next cell)
- Click "Enter Edit Mode"
- Check the boxes next to cells you want to edit
- Click "Edit Selected Cells"
- Edit through stages; "Save and Next" moves to the next selected cell
- Click "View Details" on any cell to see all specifications
- Use the stage filter dropdown to show only cells in specific stages
- Click "Export JSONL" to download all cell data in JSON Lines format
- Click "Choose File" next to "Import JSONL"
- Select a .jsonl file
- Click "Import JSONL"
- Data will be merged with existing cells
- Click "Edit JSON" on any cell for direct JSON editing (for corrections)
See dedicated section above.
data/: JSON files for each cell andbatteries/subdirectorypublic/: Web assets (HTML, CSS, JS)server.js: Node.js Express serverDockerfile: Docker container configuration
- If login fails, ensure you're using the correct password
- For import/export issues, check browser console for errors
- Data is persisted in the
datadirectory within the Docker container - Battery cells not hiding: check stage=5 and usedInBattery in cell JSON
- Uses cookie-based authentication
- All data stored locally in JSON files
- No external data transmission
No support is offered for this product. You can modify your own copy of it or get someone else to do it for you.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Author: Anthony Gallon, Owner/Licensor: AntzCode Ltd https://www.antzcode.com, Contact: https://github.com/AntzCode



