Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the files #23

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 97 additions & 51 deletions Assets/data/badges.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,99 @@
{
"badges": [
{
"name": "Founder",
"image": "https://fakeimg.pl/300x300",
"description": "Founder of WatermelonKatana, and notably awesome.",
"isUnlockable": false
},
{
"name": "Developer",
"image": "https://fakeimg.pl/300x300",
"description": "Helped develop an aspect of WatermelonKatana",
"isUnlockable": false
},
{
"name": "Administrator",
"image": "https://fakeimg.pl/300x300",
"description": "Helped WatermelonKatana by administering it.",
"isUnlockable": false
},
{
"name": "Community Hero",
"image": "https://fakeimg.pl/300x300",
"description": "A real hero of the community, who helps make this platform a great place.",
"isUnlockable": false
},
{
"name": "Innovator",
"image": "https://fakeimg.pl/300x300",
"description": "The Game gives you a Purpose. The Real Game is, to Find a Purpose.",
"isUnlockable": false
},
{
"name": "Champion",
"image": "https://fakeimg.pl/300x300",
"description": "Placed first place in a game jam, congrats!",
"isUnlockable": false
},
{
"name": "Architect",
"image": "https://fakeimg.pl/300x300",
"description": "How the f*** did you get that many views on a game?",
"isUnlockable": false
},

{
"name": "GameDev",
"image": "https://fakeimg.pl/300x300",
"description": "Congrats on publishing your first game on WatermelonKatana!",
"isUnlockable": true
}
]
"badges": [
{
"name": "Founder",
"description": "The founders of WatermelonKatana. Thanks for being here from the start!",
"image": "badge/founder.png"
},
{
"name": "Developer",
"description": "One of the official developers of WatermelonKatana. Thanks for your hard work!",
"image": "badge/developer.png"
},
{
"name": "Contributor",
"description": "Contributed to WatermelonKatana in some way. Thanks for your help!",
"image": "badge/contributor.png"
},
{
"name": "Supporter",
"description": "Supports WatermelonKatana in some way. Thanks for your support!",
"image": "badge/supporter.png"
},
{
"name": "Tester",
"description": "Tested WatermelonKatana in some way. Thanks for your help!",
"image": "badge/tester.png"
},
{
"name": "Moderator",
"description": "Moderates WatermelonKatana. Thanks for keeping the peace!",
"image": "badge/moderator.png"
},
{
"name": "Administrator",
"description": "Administers WatermelonKatana. Thanks for keeping everything running smoothly!",
"image": "badge/administrator.png"
},
{
"name": "Alpha Tester",
"description": "Tested WatermelonKatana during the alpha phase. Thanks for your help!",
"image": "badge/alpha_tester.png"
},
{
"name": "Beta Tester",
"description": "Tested WatermelonKatana during the beta phase. Thanks for your help!",
"image": "badge/beta_tester.png"
},
{
"name": "Early Access",
"description": "Got early access to WatermelonKatana. Thanks for your support!",
"image": "badge/early_access.png"
},
{
"name": "Donator",
"description": "Donated money to WatermelonKatana. Thanks for your support!",
"image": "badge/donator.png"
},
{
"name": "Artist",
"description": "Created art for WatermelonKatana. Thanks for your help!",
"image": "badge/artist.png"
},
{
"name": "Translater",
"description": "Translated WatermelonKatana into another language. Thanks for your help!",
"image": "badge/translater.png"
},
{
"name": "Streamer",
"description": "Streamed WatermelonKatana. Thanks for your support!",
"image": "badge/streamer.png"
},
{
"name": "YouTuber",
"description": "Made a video about WatermelonKatana. Thanks for your support!",
"image": "badge/youtuber.png"
},
{
"name": "Community Leader",
"description": "Played a significant role in leading and engaging the WatermelonKatana community. Thanks for fostering growth!",
"image": "badge/community_leader.png"
},
{
"name": "Event Organizer",
"description": "Organized or helped organize events for WatermelonKatana. Thanks for your effort!",
"image": "badge/event_organizer.png"
},
{
"name": "Bug Hunter",
"description": "Identified and reported bugs in WatermelonKatana. Thanks for helping improve the software!",
"image": "badge/bug_hunter.png"
},
{
"name": "Community Helper",
"description": "Helped others in the community with technical or general advice. Thanks for being supportive!",
"image": "badge/community_helper.png"
}
]
}
Binary file added Assets/images/error.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/images/mandlebrot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/images/mongodb_bell.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/images/watermelonexplode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Assets/md/posting_guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Posting Guidelines

Thank you for your interest in uploading content to WatermelonKatana! We are excited to see what you have to share with the community. Before you upload, please read the following guidelines to ensure that your content is appropriate for the site.

## Content Guidelines

### General Guidelines

- Respectful Engagement: Ensure all content is respectful and considerate of other community members. No hate speech, harassment, or discrimination is tolerated.
- Original Content: All content uploaded to WatermelonKatana must be original and created by you. Do not upload content that you do not have the rights to.
- Appropriate Content: Unless the content is marked as Mature, it should be appropriate for all audiences. This includes no explicit language, nudity, or violence.
- Malicious Content: Do not upload content that contains malware, viruses, or any other harmful software.

### Specific Guidelines

1. Images and Videos:
- Images and videos should be high-quality and relevant.
- Avoid sharing misleading or edited media that can cause harm or spread false information.

2. Text Posts:
- Be clear and concise.
- Avoid excessive use of slang, abbreviations, capitalization, or emojis.

3. Links:
- Ensure that all links are safe and relevant to the content being shared.
- Do not share links to malicious websites or content.

4. Games:
- Games should be original creations or properly credited if based on existing work.
- Avoid sharing games that promote hate speech or discrimination. Games with violence should be marked as Mature.
- Include clear instructions or descriptions of the gameplay.

## Reporting Guidelines

If you come across any content that violates the guidelines mentioned above, please report it immediately. You can report content by clicking on the "Report" button next to the post or contacting the site administrators directly.

## Enforcement

Failure to comply with the posting guidelines may result in the removal of your content and potential suspension of your account. WatermelonKatana reserves the right to take action against any content that violates the guidelines.

Thank you for helping us maintain a safe and welcoming community on WatermelonKatana! If you have any questions or concerns, feel free to [send us a message](/contact). We are here to help!
49 changes: 49 additions & 0 deletions Assets/md/tos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Terms of Service

## Introduction

Welcome to WatermelonKatana! By using our website and services, you agree to comply with and be bound by the following terms and conditions. Please review them carefully. If you do not agree to these terms, you should not use our website and services.

### 1. User Accounts

- Eligibility: You must be at least 13 years old to use our services.
- Account Security: You are responsible for maintaining the security of your account and password. WatermelonKatana cannot and will not be liable for any loss or damage from your failure to comply with this security obligation.
- Accuracy of Information: You agree to provide accurate and complete information during the registration process and to update such information to keep it accurate, current, and complete.

### 2. User Conduct

- Respectful Behavior: You agree to use our services in a manner that is respectful to other users. Harassment, hate speech, and discrimination are strictly prohibited.
- Legal Use: You agree not to use our services for any illegal or unauthorized purpose. You agree to comply with all local laws regarding online conduct and acceptable content.
- Content Ownership: YOu retain ownership of the content you create and upload to our services. However, by uploading content, you grant WatermelonKatana a non-exclusive, royalty-free, worldwide license to use, store, and display your content. WatermelonKatana will never sell your content to third parties.

### 3. Prohibited Activites

- Spamming: You agree not to send unsolicited or unauthorized advertising, spam, or any other form of solicitation.
- Malware and Hacking: You agree to not upload or transmit any software viruses, worms, or any other harmful code. You also agree not to engage in hacking, phishing, or any activites aimed at compromising the security of our services or the data of our users.
- Impersonation: You agree not to impersonate any person or entity, or falsely state or otherwise misrepresent your affiliation with a person or entity.

### 4. Content and Intellectual Property

- Copyright Infringement: We respect the intellectual property rights of others and expect users to do the same. If you believe that your work has been copied in a way that constitutes copyright infringement, please notify us with relevant details.
- Content Removal: We reserve the right to remove any content that violates these terms or is deemed inappropriate at our sole discretion.

### 5. Limitation of Liability

- No Warranty: WatermelonKatana is provided on an "as is" and "as available" basis without any warranties of any kind, either express or implied.
- Liability Limitations: In no event shall WatermelonKatana, its owners, or its employees be liable for any indirect, incidental, special, consequential, or punitive damages arising out of or related to your use of our services.

### 6. Termination

- Termination Rights: We reserve the right to terminate or suspend your account and access to our services at our sole discretion, without notice or liability, for conduct that we believe violates these terms or is harmful to other users of WatermelonKatana, us, or third parties, or for any other reason.

### 7. Changes to Terms

- Modification: We may modify these terms from time to time. Any changes will be effective immediately upon posting the updated terms on our website. Your continued use of our services after any changes constitute your acceptance of the new terms.

### 8. Governing Law

- Jurisdiction: These terms shall be governed and construed in accordance with the laws of the jurisdiction in which WatermelonKatana operates, without regard to its conflict of law provisions.

## Contact Us

If you have any questions about these terms, please contact us [here](/contact).
3 changes: 1 addition & 2 deletions Database/connect.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const Mongoose = require("mongoose");
const { Logger } = require('../util/logger');
Mongoose.set('strictQuery',true);

const uri = process.env.MONGODB_PASSWORD;
Expand All @@ -9,7 +8,7 @@ const connectDB = async () => {
useNewUrlParser: true,
useUnifiedTopology: true,
});
Logger.info("Database Connected");
console.log('MongoDB Connected.');
};

module.exports = connectDB;
2 changes: 2 additions & 0 deletions util/censored.js → util/js/censored.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const words = require('profane-words');
const { LOG_LEVELS, logInfo, logWarn, logError, logDebug } = require('./logger');

const censored = (text) => {
let censoredText = text;
words.forEach((word) => {
const regex = new RegExp(`\\b${word}\\b`, 'gi');
censoredText = censoredText.replace(regex, '****');
console.log(logWarn(`Censoring word: ${word}`));
});
return censoredText;
};
Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions util/js/logger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const picocolors = require('picocolors');

const LOG_LEVELS = {
INFO: 'INFO',
WARN: 'WARN',
ERROR: 'ERROR',
DEBUG: 'DEBUG'
}

function logInfo(message) {
return picocolors.green(message);
}

function logWarn(message) {
return picocolors.yellow(message);
}

function logError(message) {
return picocolors.red(message);
}

function logDebug(message) {
return picocolors.blue(message);
}

module.exports = { LOG_LEVELS, logInfo, logWarn, logError, logDebug };
27 changes: 27 additions & 0 deletions util/js/logger.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { LOG_LEVELS, logInfo, logWarn, logError, logDebug } = require('./logger');

describe('Logger', () => {
test('logInfo', () => {
const message = 'This is an info message';
const expected = '\u001b[32mThis is an info message\u001b[39m';
expect(logInfo(message)).toBe(expected);
});

test('logWarn', () => {
const message = 'This is a warning message';
const expected = '\u001b[33mThis is a warning message\u001b[39m';
expect(logWarn(message)).toBe(expected);
});

test('logError', () => {
const message = 'This is an error message';
const expected = '\u001b[31mThis is an error message\u001b[39m';
expect(logError(message)).toBe(expected);
});

test('logDebug', () => {
const message = 'This is a debug message';
const expected = '\u001b[34mThis is a debug message\u001b[39m';
expect(logDebug(message)).toBe(expected);
});
});
11 changes: 11 additions & 0 deletions util/js/makeLiteralChars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function makeLiteralChars(string) {
string = string.replace(/\&/g,"&");
string = string.replace(/</g,"&lt;");
string = string.replace(/>/g,"&gt;");
string = string.replace(/"/g,"&quot;");
string = string.replace(/'/g,"&apos;");

return string;
}

module.exports = makeLiteralChars;
30 changes: 0 additions & 30 deletions util/logger.js

This file was deleted.

Loading
Loading