13 Commits

Author SHA1 Message Date
Emil Nielsen
595bd18b14 refactor stakingSourceView, add vertical navigation, other styling stuff 2023-04-02 09:06:16 +07:00
9b753cf103 Porting database from SQLite to PostgreSQL
- New Postgres table schemas
- Using Stored Procedures with transactions that validate business logic
- User Ids now use UUID
- Updated and simplified all endpoints to call the stored procedures

Notes: There are still a few things missing that broke because of the migration,
in particular, because we moved a lot of the business logic into the database,
we now require that certain data that lived in the game-config.json to be
present in the database as well, to prevent cheating and truly have a single
source of truth.
2023-03-30 14:13:30 +07:00
Emil Nielsen
e90c0c9809 Modify UI 2023-03-24 15:41:31 +07:00
Emil Nielsen
16eb1405e6 Add chart.js, modify StoreItems 2023-03-23 19:55:57 +07:00
d110fba3ff Return data as camelCase 2023-03-22 13:10:57 +07:00
Emil Nielsen
6b7cf87fcf Add startStake to stakingOverview 2023-03-22 08:55:00 +07:00
Emil Nielsen
a21facaa6f Update inventoryItems when buying and upgrading 2023-03-21 13:43:22 +07:00
Emil Nielsen
406a0e0c89 Updates to StoreItemView 2023-03-20 21:05:36 +07:00
99bc7a319f Merge feature/api
* Added backend capabilities with SQLite3
* Added routes for Next.js backend
2023-03-19 10:21:19 +07:00
Emil Nielsen
7098346b51 Fix some legacy issues in the resourceStore 2023-03-19 10:13:40 +07:00
Emil Nielsen
e820f1c45b Merge feature/resource_store
* Add two views to resource store

* Add the endpoints (#4)

* add handleAmountChange

* add template changes

* add components to resourceAccounts

* refactor the storeview layout a bit

* clean up some stuff, change grand total
2023-03-19 10:06:22 +07:00
Emil Andreas Nielsen
801532759d
Feature/resource yields (#3)
* Add  handleSetUpgrade function and other related stuff

* Fix select drill to upgrade

* Small refactor - apply drill on upgrade

* Refactor types - WIP

* Add handleBuy function, sort storeItems by owned

* Add tiers to storeItems

* Show equipment on moon, add radiobutton to select

* Modify types

* Cleanup some code and comments  etc.

* Add claim function to increment user balance and decrement well

* Add API to get data

* Set inventoryItem and activeTier in state

* Update stakingSource whenever inventoryItems are updated

* Disable upgrade button when mining is active

* Add initial implementation of lightbox

---------

Co-authored-by: Nico Li <nilindenau@gmail.com>
2023-02-24 13:37:07 +07:00
Emil Andreas Nielsen
0c1f15464f
Feature/homepage (#2)
* Basic UI for resources

* Style upgrades etc.

* Add template for drill

* Add moons and drill templates

* Add mining timer

* Delete comment

* Modify some styling to cards and resources

* Enhance styling on difference components

---------

Co-authored-by: Nico Li <nilindenau@gmail.com>
2023-02-12 12:40:35 +07:00