angel1992 Posted August 10 Posted August 10 (edited) Project: Startrucker Live Demo: https://startruckervtc.co.uk/index.php Repository: https://github.com/TTVytangelofhype/StarTruckerLogger Description 'Startrucker' is a personal project that marks my dedicated return to hands-on software development. The primary goal was to build a modern, scalable web application while re-engaging with core development principles and contemporary toolchains like [mention technologies, e.g., Vite, Webpack, Docker]. Seeking Feedback & Contributions As I am actively getting back into coding, I am particularly open to feedback and suggestions. If you see an area for improvement, a better way to implement a feature, or a departure from best practices, your input would be incredibly valuable. Please feel free to: Open an Issue to suggest a feature or report a bug. Submit a Pull Request with any enhancements. Constructive criticism is not just welcomed, it's encouraged! It will contribute directly to my professional growth. P.S i am trying to get hold of the devs for star trucker to provide us with a SDK api to make this more better but this is my first time doing this as i not done coding for a long time Edited August 10 by angel1992 forgot to add more things Quote
CrazyElk Posted August 10 Posted August 10 Get this, "reCAPTCHA verification failed" when trying to create an account. Quote
angel1992 Posted August 10 Author Posted August 10 6 hours ago, CrazyElk said: Get this, "reCAPTCHA verification failed" when trying to create an account. oh weird mind you i was doing this at 3am adding it in can you provide a screenshot to show that error for me to look at 10 hours ago, CrazyElk said: Get this, "reCAPTCHA verification failed" when trying to create an account. I have fixed the issue as I checked, just working on their captcha for some reason, on with an ad blocker browser still detects the adblocker somewhere Quote
CrazyElk Posted August 12 Posted August 12 Great job, just need to address the <input type="submit" id="submit-button-register" class="btn btn-primary" value="Register" disabled=""> for the register and login buttons as they don't work. Quote
angel1992 Posted August 12 Author Posted August 12 8 hours ago, CrazyElk said: Great job, just need to address the <input type="submit" id="submit-button-register" class="btn btn-primary" value="Register" disabled=""> for the register and login buttons as they don't work. Ah, yes, I'm aware of that. Thank you for bringing this up. I am in the process of finding a fix as we speak just sorting google recaptcha out still Quote
angel1992 Posted August 13 Author Posted August 13 so i have added more and fixed a few tings redid the recapthca to v3 due to v2 being a pain added a terms and conditions when you register if yer into reading that (may change it to show before you go to the register page not sure) fixed the VTC's so that they can read and accept or deny applications fixed the contact page to make it more professional and simple with few drop downs like i said this is a fan made project so feedback and suggesstions are welcome Quote
CrazyElk Posted August 14 Posted August 14 (edited) Tells me I need to login to apply, however I am logged in, so we begin a loop. Edited August 14 by CrazyElk Quote
angel1992 Posted August 14 Author Posted August 14 44 minutes ago, CrazyElk said: Tells me I need to login to apply, however I am logged in, so we begin a loop. are u able to copy the errors and paste them here cause i dont see that issue on my screen and did you sign up before the recapthca or after Quote
CrazyElk Posted August 14 Posted August 14 Warning: Undefined variable $message in /home/startruc/public_html/view_vtc.php on line 69 Warning: Undefined variable $error in /home/startruc/public_html/view_vtc.php on line 71 Warning: Undefined variable $user_id in /home/startruc/public_html/view_vtc.php on line 75 The logo image and favicons are missing also. Cannot see how to add an image for a created VTC, probably needs to be something on the creation and profile pages. Quote
angel1992 Posted August 14 Author Posted August 14 11 hours ago, CrazyElk said: Warning: Undefined variable $message in /home/startruc/public_html/view_vtc.php on line 69 Warning: Undefined variable $error in /home/startruc/public_html/view_vtc.php on line 71 Warning: Undefined variable $user_id in /home/startruc/public_html/view_vtc.php on line 75 The logo image and favicons are missing also. Cannot see how to add an image for a created VTC, probably needs to be something on the creation and profile pages. right i think i fixed that and it should be fine Some Updates Added a pop-up box to make sure you're aware this is for Star Trucker only, with two options edited more for the admin panel for staff admins to monitor all jobs, VTCs, and users Added blocked words when registering for the site to save from confusion and impersonation Fixed some issues regarding the VTC; will be adding more to it. You can still upload a picture via PC I hope you like the updates I'm sharing with you, but I'm open to any suggestions or feedback you might have. At some point, I may have to move it into Laravel soon, but I'm debating Quote
CrazyElk Posted August 18 Posted August 18 (edited) Kudo's on your efforts to date but I have been pondering over your project and come to the following conclusion: You are putting in considerable effort aimed at a game that VERY few people play. Unless you are doing it out of an unbridled passion for this game and the fact that you MUST have a portal like this for your own personal use, then I really cannot justify you going to all this effort to appease the masses, it seems pointless. And if you are doing it for that reason, then there is probably no reason to broadcast it far and wide given its a kind of personal thing which for the most part will preclude others given they have no StarTrucker account or indeed want one. The very act of asking for input from others on this project is hampered by that fact, I had a look at the site with a veiw to provide some insight but I find my account now deleted because of the fact I cannot produce a StarTrucker game key. You seem competent enough from a development point of veiw, it appears you simply need to focus on something that those masses can all embrace. 🙂 Edited August 18 by CrazyElk Quote
angel1992 Posted August 19 Author Posted August 19 On 8/18/2025 at 2:20 AM, CrazyElk said: Kudo's on your efforts to date but I have been pondering over your project and come to the following conclusion: You are putting in considerable effort aimed at a game that VERY few people play. Unless you are doing it out of an unbridled passion for this game and the fact that you MUST have a portal like this for your own personal use, then I really cannot justify you going to all this effort to appease the masses, it seems pointless. And if you are doing it for that reason, then there is probably no reason to broadcast it far and wide given its a kind of personal thing which for the most part will preclude others given they have no StarTrucker account or indeed want one. The very act of asking for input from others on this project is hampered by that fact, I had a look at the site with a veiw to provide some insight but I find my account now deleted because of the fact I cannot produce a StarTrucker game key. You seem competent enough from a development point of veiw, it appears you simply need to focus on something that those masses can all embrace. 🙂 well untill raw furry give us what we want and yes your right but I just thought it be something fun to do to help me get bak in my coding era but we see i know it not ment to be popular that i can work on only if they give us what we need that we request as the game might be low in popurality but it got some steady players on steam small update added forums link to it and tidyed it up coding wise to make it neater Quote
angel1992 Posted August 20 Author Posted August 20 btw the forums is licensed and not a illigal copy as i paid a lot for this license Quote
CrazyElk Posted August 21 Posted August 21 (edited) 7 hours ago, angel1992 said: btw the forums is licensed and not a illigal copy as i paid a lot for this license Good to know. 😀 Edited August 21 by CrazyElk Quote
angel1992 Posted August 30 Author Posted August 30 Added the FAQ page, but stuck on what to add in the FAQ (would like help on what to add in the FAQ) Reset the Google Recaptcha due to me breaking the code again Quote
angel1992 Posted September 1 Author Posted September 1 // File: ApiClient.cs // Description: Handles all communication with the VTC website API. using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; namespace StarTruckerLogger { public static class ApiClient { // This URL points to your live website's API endpoint. private static readonly string ApiBaseUrl = "https://startruckervtc.co.uk/api.php"; private static readonly HttpClient client = new HttpClient(); // Stores the logged-in user's session data public static UserSession CurrentUser { get; private set; } public static async Task<LoginResult> LoginAsync(string username, string password) { var credentials = new { action = "login", username, password }; var jsonContent = JsonConvert.SerializeObject(credentials); var content = new StringContent(jsonContent, Encoding.UTF8, "application/json"); try { HttpResponseMessage response = await client.PostAsync(ApiBaseUrl, content); string jsonResponse = await response.Content.ReadAsStringAsync(); var result = JsonConvert.DeserializeObject<dynamic>(jsonResponse); if (result.status == "success") { // Store user data upon successful login CurrentUser = new UserSession { UserId = result.data.user_id, Username = result.data.username, VtcId = result.data.vtc_id }; return new LoginResult { Success = true }; } else { return new LoginResult { Success = false, Message = result.message }; } } catch (Exception ex) { return new LoginResult { Success = false, Message = $"API Connection Error: {ex.Message}" }; } } public static async Task<bool> LogJobAsync(string origin, string destination, string cargo, string distance, string pay) { if (CurrentUser == null) return false; // Not logged in var jobData = new { action = "log_job", user_id = CurrentUser.UserId, vtc_id = CurrentUser.VtcId, origin, destination, cargo, distance = double.Parse(distance), pay = double.Parse(pay) }; var jsonContent = JsonConvert.SerializeObject(jobData); var content = new StringContent(jsonContent, Encoding.UTF8, "application/json"); try { var response = await client.PostAsync(ApiBaseUrl, content); return response.IsSuccessStatusCode; } catch { return false; } } } public class LoginResult { public bool Success { get; set; } public string Message { get; set; } } public class UserSession { public int UserId { get; set; } public string Username { get; set; } public int VtcId { get; set; } } } // ------------------------------------------------------------ // StarTruckerLogger © 2025 by TTVytangelofhype // You are free to modify the code, but not to remove credit, // redistribute under your name, or sell it as your own. // ------------------------------------------------------------ using System; using System.IO; namespace StarTruckerLogger { public static class JobLogger { private static string logFilePath = "latest_job.txt"; public static void LogToFile(string logEntry) { File.AppendAllText(logFilePath, logEntry + Environment.NewLine); } public static string[] ReadAll() { return File.Exists(logFilePath) ? File.ReadAllLines(logFilePath) : new string[] { "No log found." }; } } } // ------------------------------------------------------------ // StarTruckerLogger © 2025 by TTVytangelofhype // You are free to modify the code, but not to remove credit, // redistribute under your name, or sell it as your own. // ------------------------------------------------------------ using System; using System.IO; namespace StarTruckerLogger { public static class JobWatcher { private static FileSystemWatcher watcher; public static void StartWatching() { watcher = new FileSystemWatcher { Path = "C:\\Games\\StarTrucker\\logs", Filter = "latest_job.txt", NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size, EnableRaisingEvents = true }; watcher.Changed += OnNewJobLogged; } private static void OnNewJobLogged(object sender, FileSystemEventArgs e) { try { Console.WriteLine($"Watcher triggered: {e.FullPath}"); // Debug Line 1 var content = File.ReadAllText(e.FullPath); Console.WriteLine($"New content: {content}"); // Debug Line 2 if (!string.IsNullOrWhiteSpace(content)) { JobLogger.LogToFile($"[MOD] {DateTime.Now} | {content.Trim()}"); } } catch (Exception ex) { Console.WriteLine("Error in watcher: " + ex.Message); } } } } // File: Program.cs // Description: Main entry point for the application. using System; using System.Windows.Forms; namespace StarTruckerLogger { static class Program { [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Show the login form as a dialog var loginForm = new LoginForm(); if (loginForm.ShowDialog() == DialogResult.OK) { // If login was successful, open the main application window Application.Run(new MainForm()); } // If login fails or is cancelled, the application will exit. } } } some C# work i been doing backend Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.