DEV Community

JAI NIRESH J
JAI NIRESH J

Posted on

Detective Simulator - Powered by pinata

This is a submission for the The Pinata Challenge

What I Built and Why

This is a full fledged crime investigation scenario simulation game, mocking a real life crime investigation, using AI , Email apis and PINATA , managing file uploads and displays to give you a simulation of a real investigation scenario.

Haven't each and everyone, dreamt about investigating and finding clues, leading to the ground breaking discovery of the villains/culprits, like the ones they show in the movies.

well, this one is a complete crime solver, leveraging AI to give yout the exact simulation you need, along with the frontend magic that make you feel you are investigaing a real crime scene.

Demo

Live Deployed version : https://ai-solvethecase-clientside.onrender.com

Code

Our client : https://github.com/jainiresh/AI-SolveTheCase-Client
Our server : https://github.com/jainiresh/AI-SolveTheCase

This is a submission for the The Pinata Challenge

What I Built and Why

This is a full fledged crime investigation scenario simulation game, mocking a real life crime investigation, using AI , Email apis and PINATA , managing file uploads and displays to give you a simulation of a real investigation scenario.

Haven't each and everyone, dreamt about investigating and finding clues, leading to the ground breaking discovery of the villains/culprits, like the ones they show in the movies.

well, this one is a complete crime solver, leveraging AI to give yout the exact simulation you need, along with the frontend magic that make you feel you are investigaing a real crime scene.

Demo

Live Deployed version : https://ai-solvethecase-clientside.onrender.com

Code

Our client : https://github.com/jainiresh/AI-SolveTheCase-Client Our server : https://github.com/jainiresh/AI-SolveTheCase

{% embed https://github.com/jainiresh/AI-SolveTheCase-Client %} {% embed https://github.com/jainiresh/AI-SolveTheCase %}

Feature Workflows

Since this is a crime investigating simulation game, we used Nylas…


This is a submission for the The Pinata Challenge

What I Built and Why

This is a full fledged crime investigation scenario simulation game, mocking a real life crime investigation, using AI , Email apis and PINATA , managing file uploads and displays to give you a simulation of a real investigation scenario.

Haven't each and everyone, dreamt about investigating and finding clues, leading to the ground breaking discovery of the villains/culprits, like the ones they show in the movies.

well, this one is a complete crime solver, leveraging AI to give yout the exact simulation you need, along with the frontend magic that make you feel you are investigaing a real crime scene.

Demo

Live Deployed version : https://ai-solvethecase-clientside.onrender.com

Code

Our client : https://github.com/jainiresh/AI-SolveTheCase-Client Our server : https://github.com/jainiresh/AI-SolveTheCase

{% embed https://github.com/jainiresh/AI-SolveTheCase-Client %} {% embed https://github.com/jainiresh/AI-SolveTheCase %}

Feature Workflows

Since this is a crime investigating simulation game, we used Nylas…

Feature Workflows

Since this is a crime investigating simulation game, we used Nylas API and an AI agent to form a thread of emails, for each case, which has the content of the crime story, context, input or the investigation , along with a descriptive image of the crime.

Each of the case that you newly open, a new thread is opened for the current user, and is maintained throughout untill the case gets solved.

There are a lot of features implemented here, which will be discussed below.

Here is a sample workflow,

  • Sign in to your account :

Image description

  • Make sure you provide access to your account, and proceed.

Image description

  • Read the INSTRUCTIONS carefully, to start playing the game.

Image description

  • You can choose to enter your own input, or click to copy the AI generated one, and paste it.

Image description

  • Now you will be redirected to the main Rules and Engagements page, which you have to look carefully and understand the game, about how to play it.

Image description

  • Upon closing the previous dialog, you will be presented with the actual AI created story context, with help of your input as below.

Image description

  • Additionally, for portable view and summarized view, you would also be receiving the case details in your inbox , that has a well formatted structure, like :

Image description

  • You can start investigating about the people you met, referring the sample suggestions, in the investigation input

Image description

  • This is how you would receive the response, of your investigation. A well written response, along with a safe image generated, that matches with the response.

Image description

  • You would also receive each investigation of yours, in your email as well, as a snigle thread of emails per case.

Image description

  • Similarly, you can perform any number of investigations as you please, and you would have a neatly arranged investigation panel, with all of them at your ease of access

Image description

  • Your email inbox thread would look like this :

Image description

  • Feeling fun, or difficult to solve it yourselves ? You can choose to invite your friends, using the button

Image description

All your investigations will be shared with your friend's email as well, and he can read your investigations from the email itself as well, or he can choose to login to the game with his invited email to investigate more by himself.

  • The case gets solved / closed, if atleast one player per case submits an answer.

Image description

Close the final dialog box, to exit the case and start a new one.

Feature overview

  • User can start with just their SSO email address with well known third party hosted authentication.
  • User can input their own custom day's experience, or opt to choose an AI generated one.
  • Users receive awesome text images, in response to the investigations, and the story.
  • Each of the gerenated image is been uploaded to pinata, and pinata powers and drives the file uploads and retrieval for the application.
  • Users can choose to view their friends, to invite to the game.
  • Invited friends, and Uninivited friends are segregated in the UI
  • Investigations performed, upto the point of inviting will be shared the invited friend.
  • The UI shows only the investigation made by the current logged in user.
  • The email thread of a particular case shows the investigations made by all the people who are invited to that case.
  • You can revisit the rules, story context, or the day input whenever you please.

More details

PINATA

Pinata is used to store , upload and retrieve the AI generated images that are being sent via the email, as well as to the frontend for simulation.

AI products

  • gemini-1.5-flash , for story and investigation text generation.
  • @cf/stabilityai/stable-diffusion-xl-base-1.0, for image generation.

Third party products have been used for efficient email communication, and contacts retrieval.

Top comments (4)

Collapse
 
jyoung4242 profile image
Justin Young

um... wow. Very creative implementation of the API, well done.

Collapse
 
jainireshj profile image
JAI NIRESH J

Thanks, i am glad you too liked it.

Collapse
 
nectres profile image
Keerthi Vasan

This is extremely creative!

Collapse
 
jainireshj profile image
JAI NIRESH J

Thanks, im glad you liked it.