Skip to content
View SP2502's full-sized avatar

Block or report SP2502

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
SP2502/README.md

Hi, I’m Shreyansh

I’m 15 and in class 11. I develop software and analyse it. Generally I design, identify and then resolve issues in software. Frequently I find that I am analysing what software should do in an issue situation.

Project Description Status
Universal Weather API Single self-hosted API to access various weather APIs Self-hostable
Aegis Windows self-regulation app with additional features for self-imposed regulation Development
Aegis Database Signed domain blocklist I created for Aegis Released (database source is now archived)
ARGUS Bot for Minecraft. Users can input goals. Development
Smaller projects OpenCompute and Creeper Runner One has been discontinued. The other is a small game.

Universal Weather API

Go · Code · Website · Quickstart · API Reference

Different weather APIs have differing data structure, functionality and regulations and can also malfunction in different ways. Ideally an application should not need to be aware of which weather API it is accessing.

Universal Weather API (UWA) sits in-front of, and acts as a middleman for, multiple weather APIs. Users add their own accounts for the APIs they wish to access and then their application communicates with one of them.

Requested data

Endpoint Information Supported
/v1/weather Current conditions OpenWeather, WeatherAPI
/v1/forecast and /v1/forecast/daily Forecast and daily summary Open-Meteo, MET Norway
/v1/geocode Location search (both ways) LocationIQ, Geoapify and Open-Meteo
/v1/astronomy Astronomy information Sunrise-Sunset
/v1/datasets Multiple of the above in one request As above

Only APIs that are configured and which support the required information will be accessed. There is also code for air quality, historical data, oceanic data and alerts. Alongside this, there are additional APIs specific to Germany and the US. These are however, all currently in development and are disabled by default. Request handling


your app

→ check its key and permission
→ look for a saved answer
→ remove providers that aren't allowed to answer this
→ try the rest in order

→ check the reply and convert it to one format
→ return it, saying which provider it came from

An abridged example of the format (not live data):

{
"data": {
"schema_version": "weather.v1",
"temperature": { "value": 25.5, "unit": "celsius" },
"condition": "partly_cloudy",
"observed_at": "2026-01-01T12:00:00Z"
},
"meta": { "provider": "openweather", "cached": false, "fallback": false }
}

Issues and UWA responses Mainly, this is where the project focuses.

Issue UWA response
Weather API is slow An API is only tried for a certain amount of time. Some time is also reserved for subsequent APIs.
Weather API returns ‘too many requests’ UWA does not re-try this API. It then proceeds to the next one.
Weather API repeatedly fails (five times) After a brief pause, UWA allows one test request to this API.
Received response is ‘200 OK’ but incorrect This is considered a failure. For example, data could be more than two hours old, include an impossible temperature or refer to a location that is too far away.
Many users request the same information All users share one request to the weather API.
All weather APIs fail Either a previously stored, but now slightly out-of-date, response may be returned or a clear error message. Which option is taken depends on the situation.
Cannot access main database Request is denied.
Currently, a maximum of four attempts are made to obtain current conditions. This prevents an infinite loop occurring if one weather API is having an especially bad day.
Decisions
  • Non-AI. By default, APIs are attempted in a pre-set order. Unhealthy APIs are avoided. Within the same order, only recently failed APIs will have their position altered so that the reason for a particular API being used can be analysed. (Previously, an API score system was used to dictate order – see this design note. However, this is not used by default.)
  • Absence is not represented as 0%. Should an API not provide humidity details then this remains blank. It will never show 0%.
  • No assumption is made about locations. Co-ordinates are used as given. Furthermore, if location name clarity is an enforced requirement then ambiguous names will cause an error.
  • All requests are tracked. As re-tries and back-ups also consume an API’s request allowance, each attempt must conform to this.
  • Stored information continues to be validated before being output.
  • Minimal external libraries. Aside from the PostgreSQL driver, only one external Go library is used. Internal code exists for, for example, the Redis client. Two developments from API testing
  • Previously, if MET Norway did not send cache headers, UWA would re-try requests after 5 minutes. According to their guidelines, this should be 3 hours. Now, this is the period which is used. (Commit).
  • Alerts for US weather information could formerly take longer than permitted. The provider timeout has therefore been increased to 30 seconds (from 6) (also experimental). Try it out You will require Go version 1.27.4 or above and your own OpenWeather API key.
git clone https://github.com/SP2502/Universal-Weather-API
cd Universal-Weather-API
export APP_DEV_CLIENT_KEY="$(openssl rand -hex 32)"
export OPENWEATHER_API_KEY=''
echo "$APP_DEV_CLIENT_KEY"   # the key your app will send
go run ./cmd/gateway

Then, in another terminal:

curl -H "X-API-Key: " \
"http://127.0.0.1:8080/v1/weather?lat=51.5074&lon=-0.1278"

This is for local testing. If it reports that no APIs are available, please review the provider guide. Windows PowerShell instructions are given in the quickstart documentation. Current status Self-hostable. Version v0.1.0-preview.1 has been released. Tests are performed by GitHub Actions, including those using Go’s race detection and security analysis. The software has also been locally tested with live PostgreSQL and Redis, selected APIs, Docker and Windows and Ubuntu services. Before utilising this software,

  • I have not yet hosted it publicly. Please review the release status for initial areas of focus.
  • Whilst UWA can recognise and deny obviously erroneous information, it cannot assess the accuracy of seemingly reasonable weather data.
  • Request restrictions are applied based on IP address, not user keys.
  • Circuit breakers (those which skip an API) are stored within each gateway’s memory. Different gateways do not share this information.
  • Each API has its own regulations. My code is licensed under MIT. Data is not.

Aegis

Flutter, Go and Windows. App code is not yet publically available.

Self-imposed regulation should remain in force even if you are tempted to reverse it. Aegis is a Windows self-regulation app. Alongside filtering adult material, it offers SafeSearch and optional extra features to further prevent impulsive de-regulation. Users define their own self-regulation regime and can choose whether to share this with a trusted person or not. Commitment Guard Alongside restricting sites, there is also provision for when a user wishes to remove their self-regulation. Mode | To alter self-regulation or uninstall --- | --- Self-Commitment | During set-up a user defines a cooling-off period. Requests must then await this period in order to allow time for reflection. Partner-Assisted | A friend, partner or family member establishes a password. This is used to authorise changes. Standard Protection | No cooling-off period or password. Just filtering is in effect. The Guard is intended to apply to both the desktop application and uninstallation process. Leaving a commitment mode operates in the same way whether via completion of a cooling-off period or receipt of partner authorisation. Areas of self-regulation

  • Filtering of adult material. A local DNS resolver is used to block domains from a list. This affects all Windows applications which utilise Windows DNS.
  • Imposing SafeSearch. The strict SafeSearch function of compatible search engines is activated to minimise explicit search results.
  • Verified updates. Updates to the blocklist can be authenticated and then accepted.
  • System Health. Information is provided regarding the status of the background service, DNS resolver, blocklist and network adaptor. This enables assessment of whether self-regulation is in force.
an app looks up a website
→ Windows DNS
→ Aegis resolver on your computer
on the block list?  → blocked
otherwise           → normal answer

Development

Flutter desktop app + installer
↕  local Windows IPC
Go background service
├─ DNS filtering
├─ content updates
└─ Commitment Guard decisions

The Guard processes data. The desktop application communicates with it using Windows inter-process communication. As self-regulation involves modification of network settings, the Windows installation code initially stores a device’s original settings. These can then be reinstated when self-regulation is no longer in force. Current status Under development. I am working towards achieving automatic activation of self-regulation. Furthermore, I aim to ensure that self-regulation continues despite device repairs and updates. Lastly, I want to make it easy to ascertain self-regulation status. Further validation of global self-regulation, browser functionality and the installation/uninstallation process is currently taking place on Windows.

Aegis Database

Go · Code · Latest release · File format This is the public aspect. It is my blocklist for Aegis and identifies, on a user’s computer, whether a domain is on a list and of which type. Information is amalgamated from four lists within the Block List Project:

Category Number of domains
Adult 953,166
Gambling 278,856
Malware 2,655,495
Phishing 190,191
Unique total 4,045,132
Figures relate to database construction on 12 October 2026. As a domain may appear on more than one list, these numbers are not strictly additive.
Release process
download the lists
→ check each list's title, format and license
→ clean the domain names and merge duplicates
→ run safety checks
→ write a sorted file, compress it, sign it
→ upload as a draft, download it again, verify, publish

GitHub Actions is programmed to execute this on the 1st of each month. Only releases with updated regulations are published. Design decisions

  • Efficient searching. Domains are listed in a single ordered section. Search occurs for both an exact match and parent domains. Comparing this to a trie structure on 1 million fictitious domains showed that although the trie was approximately 3x quicker for searching, the ordered list consumed less than half the memory and was around 4x faster to load. (Details)
  • Cease processing. Should there be an API download failure, a change in licence line or greater than a 35% change in domain quantity, or if a site such as wikipedia.org is on a list then processing is halted. The previous release remains available.
  • Validate. Releases are digitally signed. File hash verification is also conducted. An updater will not accept old releases. Constraints
  • Source material has been discontinued. On 27 October 2026 the Block List Project archived its repository. Moreover, the four lists have not been updated since July. Although the release pipeline is still functioning, it will not receive new domains unless source material is substituted.
  • Presently, only exact domain matches are recognised. Consequently, new sub-domains may escape detection.
  • Error detection is in place to identify accidental issues but not all incorrect data.
  • Around 114MB of memory is consumed by the loaded file. This is substantial for a phone.
  • Currently, there is no publicly available public key for signature verification. Thus, others are unable to independently validate releases. Aside from Aegis, this file format can be used by other applications. For instance, a DNS filter, router, extension or research script. In Go, this could be achieved using pkg/dataset:
// raw is the unzipped release file. Verify the signed manifest first.
r, err := dataset.Open(raw)
if err != nil {
log.Fatal(err)
}
mask, err := r.Lookup("example.com") // 1 adult, 2 gambling, 4 malware, 8 phishing

ARGUS

JavaScript, Node.js and Mineflayer. Code · Website My initial motivation for developing ARGUS was to investigate how far I could automate aspects of Minecraft. In addition to navigation, which can itself prove complex, deciding what to collect, how to respond to obstructions and how to manage lava and mobs are all significantly more involved. Rather than specifying micro-instructions, users can input high-level goals for the bot, such as "mine 64 diamonds". Commands can originate from in-game chat, a web-based dashboard and/or REST API.

command → permission check → understand it → plan → task queue → skill → Minecraft

No AI model is used. Commands are recognised with spelling and phrase identification. Planning is standard code. Planning Whilst recognising a request for diamonds is relatively uncomplicated, ensuring that the right pick axe (or, if underground, a water bucket) is available is more challenging. ARGUS inspects inventory and then determines what further actions are required. Generally, from a blank starting point, a ‘collect diamonds’ goal is planned as follows:

gather wood → wooden pickaxe → mine cobblestone → stone pickaxe → furnace
→ mine iron → smelt it → iron pickaxe → mine diamonds

Multiple tasks Each task is added to a scheduler.

  • Task priority. Emergency and combat tasks have higher priority than regular tasks including mining and farming. Higher priority tasks can interrupt lower priority ones.
  • Task locking. A task gains exclusive access to all of, or none of, the items it requires – for example, navigation and inventory. Tasks thus do not conflict with each other.
  • Task sequencing. A task is not executed until all prerequisite tasks have successfully completed.
  • Time-outs. By default, extended tasks have a 3 minute time-out and shorter ones a 1 minute time-out. Failed tasks can be re-attempted twice. Skills Skill | Purpose --- | --- Navigation | Navigate, follow people, return home and detect being stuck Mining | Will not begin unless a pick axe is available (or, if underground, a water bucket). Never mine vertically upwards or downwards. Manage full inventory. Farming | Only harvest crops which have been cultivated. Re-plant. Maintain 16 seeds. Forestry | Chop and plant trees. Leave human-made logs and trees close to base undisturbed. Combat | Attack, defend and patrol. Protect team members. Withdraw if health is low. Building | Assess resources and then construct using templates. Crafting and storage | Create and smelt items. Locate, categorise and index items in chests. Control Whilst enhanced bot functionality is beneficial, it can also pose increased risk. Therefore, commands undergo scrutiny to ensure that they are suitable. This includes:
  • User grade – ranging from owner to guest.
  • Confirmation for high-risk commands such as complete item disposal, player attack and system shutdown.
  • All users (excluding owners) are restricted to 10 commands per minute.
  • A web-based dashboard displaying task, inventory, health and local environment information, together with logs. Problems and areas for improvement
  • Resolved: Previously, commands would erroneously return ‘success’ even though no action had been taken. Now, unimplemented commands will report that they are not yet available.
  • Area for improvement: Should a task be interrupted it is re-inserted into the scheduler. However, tasks do not regain previously attained skill progress. As a consequence, counting may recommence from 0.
  • Area for improvement: Termination of a task causes it to release locks without awaiting actual cessation of relevant skills.
  • Absent: Certain inventory and location-related commands. Status Ongoing. My feature readiness table indicates that user grades and the dashboard are both ready for use. However, further in-world testing of the above skills is still required. Smaller Projects

OpenCompute (discontinued)

Python · Code I was experimenting with combining simple tools together in order to facilitate AI usage, only employing models where appropriate. It creates plans, carries out research and employs tools to handle files and make web requests. Unfortunately, I only progressed to stage 2 of a target 7 and the project is no longer actively maintained.

Creeper Runner

HTML, CSS and JavaScript. Play · Code Out of interest, I developed a small Minecraft-style endless runner. This allowed me to investigate game and animation features. No game engine was used and HTML Canvas was employed. The target is to achieve a score of 200. Common issues At what point should software stop making assumptions? How is it known that downloaded data is still valid? To what extent should a simplified interface obscure underlying processes? External code In my spare time I enjoy flying drones and hope to enter the drone industry in the future. I also play badminton. Website · shreyansh.2502@outlook.com

Popular repositories Loading

  1. MINCRAFT-RUNNER-WIX MINCRAFT-RUNNER-WIX Public

    JavaScript 1

  2. SP2502 SP2502 Public

  3. argus-minecraft-bot argus-minecraft-bot Public

    Autonomous Minecraft Java bot built with Mineflayer, featuring modular automation, persistent state, task orchestration, and self-directed behavior.

    JavaScript

  4. OpenCompute OpenCompute Public

    Python

  5. Aegis_Database Aegis_Database Public

    Go

  6. Universal-Weather-API Universal-Weather-API Public

    An MIT-licensed, self-hosted weather API gateway with intelligent location-aware provider routing, automatic failover, and unified schemas for weather and environmental data.

    Go