eJustice is a small web project which works like a virtual judge.
It takes what both victim and accused says, and gives a fair decision using IPC rules and some basic emotional logic. The main problem it tries to solve is that justice takes too long in real life, and small matters stay pending for years. This tool gives a simple and quick way to get decision. It has easy interface, voice that reads the judgement, option to download result, and nice clean design with small animations.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Today I finished the E Justice project. Everything is working now and I feel really good about it.
In this last session I completed the small parts which were left. First I added the option to enter statements for defendant also. Before this only victim side was there. Now I made a mode switch button so user can enter for both sides. It changes the label and stores the data in correct place.
Then I improved the verdict screen. The AI gives the result in three parts – sentencing, reasoning and precedents. I formatted it properly so it looks nice and easy to read. I also added button to download the verdict as text file. And also one button to go back to input screen if user want to change anything.
After that I added text to speech also. So now when the verdict comes, it can be heard also. Makes it feel more like a real court system.
Some small bugs were there in speech and file upload which I fixed today. Earlier it was not taking some PDFs or images but now it is mostly working fine.
Other things like splash screen, background change, sound on verdict, etc I had already done before. So now all features are working together nicely. User can enter info using text, speech or file, and final judgement is given by AI in clear format.
This project taught me many new things. Like how to use JS libraries, how to connect with AI, how to do frontend and design properly. I was not thinking it will become this big but I just kept going step by step and now it is done.
Feeling proud :-)
I worked on the main working part of the project. I made the full input system where user can give info for the victim using three options. One is typing, second is speaking and third is uploading file. All of these are working properly now.
For text, when user clicks the button, a box comes where they can type the statement and submit. For speech, I used browser speech recognition. User speaks and the line gets added to the list. It works good in Chrome mostly. For document upload, user can give pdf, image or txt file. File reading part is not perfect yet but uploading is happening fine.
Then I added a section where user can see what all statements they have added. It shows in a list and hides again when they click that button again. Just a simple toggle only.
Most important work was the Finalise Case button. When user clicks it 4 times, the background changes, sound is played and then it sends all the statements to AI to get the final verdict. The prompt I made tells AI very clearly to not add anything extra. It has to give three things only – sentencing, reasoning and precedents. Also told it to not use symbols or big words. So the answer comes neat and looks like real court decision.
After AI sends the verdict, I hide the main screen and show the result screen. There I added two buttons. One is to go back and one is for saving verdict as txt file. I did some formatting also so that the result looks little better.
Still few things are pending like switching between victim and defendant statements, also verdict screen can look better. But today's progress was good.
Now the input, storing and verdict system is ready. In next sitting I will do
text to speech for verdict
allowing defendant statements
better transitions and design
proper export system
Today I worked on the front part of my e-justice project. I made the main layout using HTML and CSS. There is one panel on left and one on right, which looks balanced and clean. I also added a splash screen using a gif (1.gif) that shows up when the page opens, gives a nice feel i think.
The background image (2.png) is added to match the justice theme. Buttons are also styled, they have hover effect and look good. I created one hidden area for typing statement, one box for verdict display, and one more part where added statements will be shown. Right now these are hidden but later I will make them show with JS.
Then I added two important libraries. First one is Tesseract.js, this is for reading text from images. Useful when someone uploads photo of a printed or handwritten statement. Second one is PDF.js, which I added as a module. It will allow us to read text from PDF files, most legal docs are in that only.
CSS part I focused on spacing, colours, transitions and small effects. The statement box can scroll and has light background so text is easy to read.
Didn't start much logic part today. Mostly focused on design and setup. But now the base is ready. In next session I will start making buttons work, connect OCR and PDF tools properly, and show the extracted text.
I also have to add verdict generation, background change on verdict, text-to-speech, and option to export verdict as file.
So overall today I made the base and connected the tools. Now next step is to make it smart and working properly.