Activity

joseph1

Devlog

I finally have some resemblance of a working project. Now, stocks are actually displayed on the site. A lot of work was done to get here.

The details

Firstly, I needed a market class so I could run the simulation on all stocks. Thankfully, I just needed to wrap the the class with a “Market” class that runs the simulation for all of the stocks. Next, I worked a bit on the database. I actually chose a different approach to the database than previously stated. I instead created a new sqlite3 database and use sqlite3 on python to access it. On the Nuxt side of things, I chose not to use prisma and instead use the better-sqlite3 lib to communicate. I still use prisma for users but, I don’t think it would have played nice with python. Also on the simulation-side, I made the stocks load from a json file. This is great because I intend to allow people to merge in their own stocks to encourage creativity. Now for events, I actually have the AI prompt pretty much done. I also implemented events that communicate with the OAI API. For now, I just print the events and I have yet to actually implement the generated events but I have a solid framework for it. I also implemented all the API routes to communicate with the market database. This allowed me to create a functional Market page. This allows me to just fetch it from the frontend easily.

Next Steps

I’m putting events on hold for now. I don’t even know if I’ll implement them with the AI stuff. I want to work on the actual buying and trading of stocks by the user. I don’t think it’ll be too hard to implement. I’ll also work on SSE/polling so the stocks live update. I’ll probably poll because SSE (Server Sent Events) are a lot of work. But I want to learn SSE/Websockets since i’ve never really used them before. I also want some sort of onboarding for users. I might also look into allowing hackclub oauth instead of also github oauth.

Attachment
Attachment
0
joseph1

Devlog

I worked on the stock market simulation. It simulates crashes, surges and regular market movement. I’m pretty happy about how the market movement ended up turning out. I also used a python notebook to take a look at what the market actually looks like. It’s really unpredictable while also being somewhat logical which is exactly how I want the game to turn out.

The details

The simulation is a simple python script with a scheduler that will run the market on a regular interval. The plan is to have python communicate with the same database as Nuxt. This may introduce some challenges due to Prisma, but I think it will work out as long as I follow the schema set by Prisma. The Nuxt app will handle buying and selling on the backend while the python app just moves the market simulation forward. SQLite should handle this fine.

Next Steps

Now, I need to work on random events powered by AI. The market is already super unpredictable and quick so I need to make them noticeable and make them carry very heavy consequences. To implement events, the python “Market Manager” will communicate with the OpenAI API to get a description of an event. I think events will be mostly random with only the description being handled by an LLM.

Attachment
Attachment
Attachment
0
joseph1

Finished some work on the market page and smoothed out auth. I added a nice navbar too. The market is hard coded for now just so I can preview what it looks like.

Attachment
0
joseph1

I basically rolled auth out and made the UI with Nuxt UI. I also played with graphs a bit

Attachment
Attachment
0
joseph1

I now finished the hashing page form. When you click on the “Hash” button, it task you to this form. There are only 2 hashing algorithms for now. Now, I’ll focus on the actual implementation of the Hashing page. I’ll use Botan to implement the crypto functions.

Attachment
0
joseph1

I now have an initialized project for Qt/Kirigami. I also created a small home page that will be used to select whatever cryptographic technique you want to use. It’s not super responsive but I need to focus on the actual functionality first before I get to that.

Attachment
0
joseph1

I’m working on my first project! This is so exciting. I can’t wait to share more updates as I build.

Attachment
0