Skip to content

Conversation

KomkaGames
Copy link

@KomkaGames KomkaGames commented Aug 8, 2025

Mcpe generator for Minecraft PE

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Release
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


Important

Introduces a Minecraft PE texture generator with Node.js backend and React frontend, including user authentication, texture generation, and history tracking.

  • Backend:
    • Adds server.js with Node.js and Express for handling API requests.
    • Connects to MongoDB for user data management.
    • Integrates AWS S3 for storing generated textures.
    • Implements /api/generate-texture for texture generation with resolution checks.
    • Adds /api/set-plan, /api/history/:userId, and /api/set-language for user management.
  • Frontend:
    • Adds src/App.js for React UI with Firebase authentication.
    • Implements texture creation form and history display.
    • Supports language selection with i18n.js for localization.
  • Testing:
    • Adds Cypress tests in cypress/integration/app.spec.js for login, language change, texture creation, and history display.
  • Misc:
    • Adds package.json with necessary dependencies for backend and frontend.

This description was created by Ellipsis for a6a364d. You can customize this summary. It will automatically update as commits are pushed.

Mcpe generator for Minecraft PE
Copy link

vercel bot commented Aug 8, 2025

@KomkaGames is attempting to deploy a commit to the Onlook Team on Vercel.

A member of the Team first needs to authorize it.

const User = mongoose.model('User', userSchema);

// Налаштування AWS S3
const s3 = new AWS.S3({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using hardcoded AWS credentials; rely solely on environment variables to manage sensitive data.

}, {
headers: { Authorization: `Bearer your_huggingface_api_key` },
});
const fileBuffer = textureResponse.data; // Припускаємо, що це бінарний файл
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current code assumes textureResponse.data contains binary file data, but the Hugging Face API typically returns JSON responses. To properly handle this, extract the actual image data from the response. For example:

const fileBuffer = Buffer.from(textureResponse.data.image, 'base64');

This converts the base64-encoded image data from the JSON response into a proper binary buffer that can be uploaded to S3. The exact property name (image) may vary depending on the specific Hugging Face endpoint being used.

Suggested change
const fileBuffer = textureResponse.data; // Припускаємо, що це бінарний файл
const fileBuffer = Buffer.from(textureResponse.data.image, 'base64');

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

if (firebaseUser) {
setUser(firebaseUser);
// Встановлення плану "Про" для вашого email
await axios.post('http://localhost:3000/api/set-plan', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded URL http://localhost:3000/api/set-plan won't work in production environments. Consider using relative URLs (like /api/set-plan) or implementing a configurable base URL that can be set according to the environment. This approach ensures the application works correctly across development, staging, and production environments.

Suggested change
await axios.post('http://localhost:3000/api/set-plan', {
await axios.post('/api/set-plan', {

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant