Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Job manager crashed while running this job (missing heartbeats).
Error code:   JobManagerCrashedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

repository
large_string
repo_score_template
large_string
sainijitendrakumar/Hyggex-project
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: sainijitendrakumar/Hyggex-project Repository Tree: └── Hyggex-project-main ├── HyggeX │ ├── src │ │ ├── pages │ │ │ └── HyggeX.jsx │ │ └── App.jsx │ ├── index.html │ ├── package-lock.json │ └── package.json └── README.md Code to be assessed: <|repo_name|>sainijitendrakumar/Hyggex-project <|file_sep|>Hyggex-project-main/README.md # Hyggex-project first before use this code please install dependances by :- npm -i This project is made in reactjs by vite. so for running it use cmd :- npm run dev for styling I used pure Tailwind CSS in it. I used Icons from fontawesome.com in it. <|file_sep|>Hyggex-project-main/HyggeX/src/App.jsx import React from 'react'; import './index.css'; import HyggeX from './pages/HyggeX'; export default function App() { return ( <HyggeX /> ); } <|file_sep|>Hyggex-project-main/HyggeX/src/pages/HyggeX.jsx import "./yes.jpg" export default function HyggeX() { return ( <div className="bg-[#F9F9F9] flex flex-col p-[1.7rem_6.4rem_19.2rem_6.5rem] w-[90rem] box-sizing-border font-sans"> <div className="m-[0_0rem_4.2rem_0] flex flex-row justify-between w-[77.1rem] box-sizing-border font-sans"> <div className="flex flex-row items-center"> <img className="w-13 h-10 bg-[#F9F9F9]" src="/yes1.png" alt="logo"/> <p className="text-2xl text-blue-950">Hygge<span className="font-bold">X</span></p> </div> <div className="flex flex-row box-sizing-border"> <div className="m-[0.8rem_2.5rem_0.8rem_0] flex flex-row justify-between w-[17.6rem] h-[fit-content] box-sizing-border"> <span className=" break-words font-sans font-normal text-[1.1rem] text-[#3A3740]"> Home </span> <span className="break-words font-sans font-normal text-[1.1rem] text-[#3A3740]"> Flashcard </span> <span className="break-words font-sans font-normal text-[1.1rem] text-[#3A3740]"> Contact </span> </div> <div className="m-[0.8rem_2.6rem_0.8rem_0] inline-block break-words font-sans font-normal text-[1.1rem] text-[#3A3740]"> FAQ </div> <div className="rounded-[2rem] bg-[linear-gradient(180deg,#06286E,#164EC0)] flex items-center justify-center p-[0.8rem_0rem_0.8rem_0] w-[8rem] box-sizing-border"> <span className="break-words font-sans font-medium text-[1.1rem] text-[#FFFFFF]"> Login </span> </div> </div> </div> <div className="m-[0_0.2rem_4.3rem_0.2rem] flex flex-row self-start w-[fit-content] box-sizing-border"> <div className="m-[0_0.6rem_0_0] flex flex-row items-center justify-center box-sizing-border"> <div className="flex flex-col items-center justify-center w-[1.3rem] h-[1.3rem] box-sizing-border"> <i className="fa-solid fa-house"></i> </div> <div className=" flex flex-col items-center justify-center mx-2 "> &gt; </div> <div className=" break-words font-sans font-medium text-[1.1rem] text-[#696671]"> Flashcard </div> </div> <div className=" flex flex-row "> <div className=" flex flex-col items-center justify-center mx-2"> &gt; </div> <span className="break-words font-sans font-medium text-[1.1rem] text-[#696671]"> Mathematics </span> <div className="flex flex-row "> <div className=" flex flex-col items-center justify-center mx-2"> &gt; </div> <span className="break-words font-sans font-semibold text-[1.1rem] text-[#06286E]"> Relation ... (remaining file content omitted) ... <|file_sep|>Hyggex-project-main/HyggeX/index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/yes1.png" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>HyggeX</title> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="stylesheet" href="css/font-awesome.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"/> <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet" /> </head> <body> <div id="root"></div> <script type="module" src="/src/main.jsx"></script> </body> </html>
a16003022/Portafolio_Herramientas3
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: a16003022/Portafolio_Herramientas3 Repository Tree: └── Portafolio_Herramientas3-main ├── Pages │ ├── 1_Estadistica.py │ ├── 2_Graficas.py │ └── 3_Modelos.py ├── README.md ├── main.py └── requirements.txt Code to be assessed: <|repo_name|>a16003022/Portafolio_Herramientas3 <|file_sep|>Portafolio_Herramientas3-main/README.md # Portafolio Herramientas3 - Heisler Narváez Kú -------------------------------------------------------------------------------------------------------- ## 1) Modelo en Azure ML Studio * a) Screenshot del modelo generado: ![Completado](https://github.com/a16003022/Portafolio_Herramientas3/blob/main/Completado.png) * b) Models: ![Modelos](https://github.com/a16003022/Portafolio_Herramientas3/blob/main/Modelos.png) * c) Métricas del mejor modelo: ![Metricas](https://github.com/a16003022/Portafolio_Herramientas3/blob/main/Metricas.png) ## 2) Mongo DB - Log de commits * a) Práctica de conectarse a una base de datos desde Colab:<br> <b>IMPORTANTE:</b> Dicha práctica se encuentra al final del documento, ya que además contiene todos los ejercicios realizados en clase.<br> Link del archivo colab: https://colab.research.google.com/drive/1nBuKbm_TV0SzAzG9XqcLSQGes_oM2TLd?usp=sharing ## 3) Mongo DB - Práctica de Map reduce: <br> * Aquí como nos funcionó desde la línea de comandos, lo hicimos desde la interfaz gráfica de MongoDBCompass. * En la colección donde deseamos hacer un aggregation seleccionamos la función que queremos utilizar en el pipeline, en este caso fue $group para agrupar todos los elementos de la colección por la fecha de envío del correo y sumar cuántos elementos agrupó.<br> ![Aggregarion](https://github.com/a16003022/Portafolio_Herramientas3/blob/main/Aggregation.png) * Una vez verificado el resultado esperado en la vista previa, guardamos este pipeline como una vista, lo cual será de gran ayuda si se insertan nuevos documentos a la colección, esta vista se irá actualizando; contrario al caso de querer crear una nueva colección.<br> ![Vista](https://github.com/a16003022/Portafolio_Herramientas3/blob/main/VistaAg.png) ## 4) Modelos de regresión lineal con streamlit * Link de la aplicación desplegada: https://a16003022-portafolio-herramientas3-main-p11lwy.streamlit.app/ <|file_sep|>Portafolio_Herramientas3-main/Pages/1_Estadistica.py def run(): import pandas as pd import streamlit as st import streamlit.components.v1 as components hide_streamlit_style=""" <style> #MainMenu {visibility:hidden;} footer {visibility:hidden;} </style> """ st.markdown(hide_streamlit_style,unsafe_allow_html=True) URL='https://gist.githubusercontent.com/netj/8836201/raw/6f9306ad21398ea43cba4f7d537619d0e07d5ae3/iris.csv' dfIris=pd.read_csv(URL) st.title("Análisis estadistico de Iris Dataset") components.html( """<hr style="height:3px;border:none; color:#333;background-color:#333" />""") print(dfIris.head()) st.header("Estadisticas") st.write("Filas, Columnas:") st.write(dfIris.shape) st.write("Describe:") st.dataframe(dfIris.describe()) st.write("Clases:") st.write(dfIris["variety"].value_counts()) <|file_sep|>Portafolio_Herramientas3-main/Pages/2_Graficas.py def run(): import streamlit as st import pandas as pd import plotly.express as px import streamlit.components.v1 as components import numpy as np import plotly.graph_objects as go hide_streamlit_style=""" <style> #MainMenu {visibility:hidden;} footer {visibility:hidden;} </style> """ st.markdown(hide_streamlit_style,unsafe_allow_html=True) st.title("Visualización") components.html( """<hr style="height:3px;border:none; color:#333;background-color:#333" />""") URL='https://gist.githubusercontent.com/netj/8836201/raw/6f9306ad21398ea43cba4f7d537619d0e07d5ae3/iris.csv' dfIris=pd.read_csv(URL) fig=px.box(dfIris,y="variety") #dfIris.plot(kind='box', ) st.plotly_chart(fig,use_container_width=True) st.subheader("Histogramas") for i in range(0,len(dfIris.columns)): fig=px.histogram(dfIris,x=dfIris.columns[i]) st.plotly_chart(fig,use_container_width=True) st.subheader("Gráfica de correlación") fig=px.scatter_matrix(dfIris, dimensions=dfIris.columns[0:4], color="variety") st.plotly_chart(fig,use_container_width=True) st.subheader("Correlación-Mapa de color") dfIris=dfIris.drop('variety',axis=1) df_corr=dfIris.corr() fig=go.Figure() fig.add_trace( go.Heatmap( x=df_corr.columns, y=df_corr.index, z=np.array(df_corr) ) ) st.plotly_chart(fig,use_container_width=True) <|file_sep|>Portafolio_Herramientas3-main/Pages/3_Modelos.py def run(): import pandas as pd import streamlit as st import streamlit.components.v1 as components from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import cross_val_score from sklearn.neighbors import KNeighborsClassifier hide_streamlit_style=""" <style> #MainMenu {visibility:hidden;} footer {visibility:hidden;} </style> """ st.markdown(hide_streamlit_style,unsafe_allow_html=True) st.title("Entreamiento y precisión de modelos") components.html( """<hr style="height:3px;border:none; color:#333;background-color:#333" />""") URL='https://gist.githubusercontent.com/netj/8836201/raw/6f9306ad21398ea43cba4f7d537619d0e07d5ae3/iris.csv' names=['sepal-length','sepal-width','petal-length','petal-width','class'] dfIris=pd.read_csv(URL,names=names) dfIris=dfIris[dfIris["sepal-length"]!="sepal.length"] x_train,x_test,y_train,y_test=train_test_split(dfIris[dfIris.columns[0:4]],dfIris[dfIris.columns[-1]], test_size=0.2) modelos=[] # print(x_train, x_test) modelo=LogisticRegression(random_state=0).fit(x_train,y_train) modelo.score(x_test,y_test) modelo.predict(x_test) modelos.append(("LR",LogisticRegression())) st.subheader("Modelo Regresión Lineal") st.write("Puntuación:") st.write(modelo.score(x_test,y_test)) st.write("Resultados de predicciones:") st.write(modelo.predict(x_test)) st.subheader("Modelo KFold") skf=StratifiedKFold(n_splits=10,shuffle=True,random_state=1) model=KNeighborsClassifier(n_neighbors=3) scores=[] predictions=[] for train_index,test_index in skf.split(x_train,y_train): x_train_fold,x_test_fold=x_train.iloc[train_index],x_train.iloc[test_index] y_train_fold,y_test_fold=y_train.iloc[train_index],y_train.iloc[test_index] model.fit(x_train_fold,y_train_fold) scores.append(model.score(x_test_fold,y_test_fold)) predictions.append(model.predict(x_test)) average_score=sum(scores)/len(scores) st.write("Precisión del modelo:") st.write(average_score) st.write("Resultados de predicciones:") for i,pred in enumerate(predictions): st.write(f"Fold {i + 1}: {pred}") st.subheader("Modelo KNeigghbors") modeloKN=KNeighborsClassifier(n_neighbors=3) modeloKN.fit(x_train,y_train) st.write("Precisión del modelo") st.write(modeloKN.score(x_test,y_test)) st.write("Resultados de predicciones:") st.write(modeloKN.predict(x_test)) <|file_sep|>Portafolio_Herramientas3-main/requirements.txt pandas streamlit scikit-learn plotly numpy <|file_sep|>Portafolio_Herramientas3-main/main.py import streamlit as st import os import importlib # Obtener todas las páginas .py en la carpeta Pages pages=[f[:-3]for f in os.listdir("Pages")if f.endswith(".py")] # Agregar la página seleccionada a la barra lateral selection=st.sidebar.radio("Seleccionar página:",pages) # Importar la página seleccionada y ejecutarla page_module=importlib.import_module(f"Pages.{selection}") page_module.run()
alfiramdhan/Data-Analytics-Portfolio
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: alfiramdhan/Data-Analytics-Portfolio Repository Tree: └── Data-Analytics-Portfolio-main ├── Cohort Analysis │ ├── Code.md │ └── Readme.md ├── Dashboard │ └── Readme.md ├── Hypothesis Testing │ └── Readme.md ├── KMeans Clustering │ └── Readme.md ├── Linear Regression │ └── Readme.md ├── Propensity Model & Cost Benefit Analysis │ └── Readme.md └── Readme.md Code to be assessed: <|repo_name|>alfiramdhan/Data-Analytics-Portfolio <|file_sep|>Data-Analytics-Portfolio-main/Readme.md # Hi, I'm Alfi 👋🏾 This repository contains portfolios for case studies in Revou's 3-month full-stack data analysis program. Revou is an intensive data analysis program with an acceptance rate of 6% and a weekly learning commitment of 15-20 hours Each case study folder contains the following files : - A readme file explaining the situation, tasks, actions, and results - Google colab files consist of links to python code - MD files containing SQL queries that answer the respective challenge questions ## Challenge case studies * [Hypothesis Testing & Regression](https://github.com/alfiramdhan/Data-Analytics-Portfolio/tree/main/Hypothesis%20Testing%20%26%20Regression) * [Cohort Analysis](https://github.com/alfiramdhan/Data-Analytics-Portfolio/tree/main/Cohort%20Analysis) * [KMeans Clustering](https://github.com/alfiramdhan/Data-Analytics-Portfolio/tree/main/KMeans%20Clustering) * [Linear Regression](https://github.com/alfiramdhan/Data-Analytics-Portfolio/tree/main/Linear%20Regression) * [Dashboard](https://github.com/alfiramdhan/Data-Analytics-Portfolio/tree/main/Dashboard) *** <|file_sep|>Data-Analytics-Portfolio-main/KMeans Clustering/Readme.md # Python Skillset : - Data cleaning - String manipulation - Combine & merge datasets - Data aggregation - Descriptive statistic - Analyzing using visualization - Cluster Analysis ## RevoBank - Customer Segmentation using K-Means Clustering : <a href="https://colab.research.google.com/drive/1P4hUoBLUAkVYsrR3NeUQJ6xxGOmBL9V2?usp=sharing"> Google Colab </a> ## Situation ## Background RevoBank, a European bank that provides credit cards to its customers. Over the last 6 months, Revo bank has implemented new promotions specifically for credit users. This promotion takes the form of distributing Revoshop vouchers, which is one of Revo Bank's partners, to all Revo Bank customers via email and SMS. Customers will receive 15 points equivalent to 1.5 euros for each voucher exchange for eligible transactions. As a data analyst, my role is to provide insight into promo performance in the past 6 months, create customer segmentation and identify business opportunities associated with the customer segmentation. ## Problem Definition When customers are enrolled in a loyalty program, they tend to spend more money on each purchase, because they are incentivized to earn rewards. This increase in spending can lead to a significant increase in revenue for the business. Therefore, after running the promotion for 6 months, the Card Partnership Lead at Revo bank wanted to know spending patterns among Revoshop customers who used Revobank credit cards and looked for ways to reduce promotional costs. ## Objective The aim of this project is to provide insight into promo performance in the last 6 months, create customer segmentation and identify business opportunities related to customer segmentation. ## Task & Actions - Import dataset into Google Colab -> Use Python libraries including pandas and numpy -> To load dataset and perform data cleaning - Identify dataset -> Use Python libraries including pandas, numpy, seaborn and matplotlib to analyze and visualize data -> To analyze trends and pattern in promo performance in the last 6 months - Create KMeans Clustering -> Use Python libraries including KMeans, SilhouetteVisualizer -> To find the segments of customers based on their promo sensitivity and potential to generate revenue ## Result The result of this project, 3 clusters were obtained, namely Satisfied High Shoppers, Moderate Shoppers, and Cautious Shoppers. Based on these findings, - **Business Opportunity related to Cluster** There are 3 clusters, where **Moderate Spenders** is a cluster that brings many benefits to Revobank. This cluster will **most likely provide more revenue** to Revobank with higher generated income, greater proportion sensitive to promos and **low promotional costs** - **Target Female customers** Female customers have a **significant impact on revenue** since they dominate transactio ... (remaining file content omitted) ... <|file_sep|>Data-Analytics-Portfolio-main/Cohort Analysis/Code.md # EDA ### 1. Total orders : 124,879 ```SQL SELECT COUNT(order_id)as total_order FROM `sql-project-376612.thelook_ecommerce.orders` ``` ### 2. Total complete order : 31,234 ```sql SELECT COUNT(order_id)as total_order FROM `sql-project-376612.thelook_ecommerce.orders` WHERE status = 'Complete'; ``` ### 3. Total calcelled order : 18,759 ```sql SELECT COUNT(order_id)as total_order FROM `sql-project-376612.thelook_ecommerce.orders` WHERE status = 'Cancelled' ``` ### 4. Considering completed orders and focusing on the month of shipment, which month in the year 2021 had the lowest total order performance for the Jeans category? ```sql SELECT DATE_TRUNC(date(o.shipped_at),month) as month, COUNT(o.order_id)as total_order FROM sql-project-376612.thelook_ecommerce.orders o LEFT JOIN sql-project-376612.thelook_ecommerce.order_items oi ON o.order_id = oi.order_id LEFT JOIN sql-project-376612.thelook_ecommerce.products p ON oi.product_id = p.id WHERE o.status = 'Complete' and EXTRACT(YEAR FROM o.shipped_at) = 2021 and p.category = 'Jeans' GROUP BY 1 ORDER BY 2 ASC LIMIT 1; ``` ### 5. To retrieve the location with the highest number of buyers (use unique user) who made purchases on our platform during the year 2022, which of the following SQL scripts is correct? ```sql SELECT u.country, COUNT(DISTINCT o.user_id)as number_buyers FROM sql-project-376612.thelook_ecommerce.users u LEFT JOIN sql-project-376612.thelook_ecommerce.orders o ON u.id = o.user_id WHERE EXTRACT(YEAR FROM o.shipped_at) = 2022 AND o.status = 'Complete' GROUP BY 1 ORDER BY 2 DESC LIMIT 1; ``` ### 6. Considering the completed orders that were shipped in the year 2022, which distribution center to which country destination had the highest total number of items sold? ```sql SELECT dc.name, u.country, SUM(o.num_of_item)as total_item_sold FROM sql-project-376612.thelook_ecommerce.orders o LEFT JOIN sql-project-376612.thelook_ecommerce.users u ON o.user_id = u.id LEFT JOIN sql-project-376612.thelook_ecommerce.order_items oi ON o.order_id = oi.order_id LEFT JOIN sql-project-376612.thelook_ecommerce.products p ON oi.product_id = p.id LEFT JOIN sql-project-376612.thelook_ecommerce.distribution_centers dc ON p.distribution_center_id = dc.id WHERE o.status = 'Complete' AND EXTRACT(YEAR FROM o.shipped_at) = 2022 GROUP BY 1,2 ORDER BY 3 DESC LIMIT 1; ``` ---- # Monthly Inventory ## 1. How is the monthly inventory growth trend in percentage by product category in the past 1 year? ### Steps 1 : - Create `CTE` to break up complex queries in BigQuery - In first table, we can calculate number of event in inventory in each month each category - Use `DATE_TRUNC()` to truncates a month value - Use `COUNT DISTINCT` to remove duplicate - Use `EXTRACT()` to ext ... (remaining file content omitted) ... <|file_sep|>Data-Analytics-Portfolio-main/Linear Regression/Readme.md # Spreadsheet/ Excel Skill sets: - Correlation Analysis - Regression Linear ## Predicting The Value of Order using Linear Regression <a href="https://docs.google.com/spreadsheets/d/1rLN1GD9aw2Y7kE9KJqgB7KyZc_KSrc1PxmeDv-a9ri0/edit?usp=sharing"> Google Sheets</a> ## Situation ### Problem Definition a Luxura investor and loyal Luxura user, is a fan of the Adibi brand. He asked the Luxura team to provide his personal insight by predicting the value of Adibi's order because he had spent a lot of money on Adibi. So my role as a data analyst is to create a Linear Regression model to understand which variables influence Adibi's order value ### Objective The aim of this project is to create a Linear Regression model to understand which variables influence Adibi's order value ### Task & Actions 1. Correlation Analysis : - Find Independent variable with high correlation to Dependent - Remove Independent variables with high correlation (Non-multicollinearity) 2. Model Evaluation : - Partial test - Simultaneous Test - The R Square 3. Model Implementation : Regression formula implementation ### Result - Based on the regression results, it has an R square of 61% which is a good model - Adibi Qty of Order, Cellina Value of Order and Promotion Adibi are variables that affect Adibi Value of Order - Provide a Tiered Discount to encourage customers to buy more Adibi. Customers will buy more than one product by giving bigger discounts as they spend more. In turn, this increases sales and average order value (AOV). How to run? : Match spend with typical AOVs. Since our Adibi AOV is $47.35, we can start the discount at $59.99 - Get 10% off $59+ - Get 20% off $119+ - Get 30% off $239+ - Because Cellina has influence on the value of Adibi's orders, we can hold promotions or collaborate with Cellina so that their products complement each other ## Deck <a href="https://drive.google.com/file/d/1Vj_k0oT1h2uuI0rll7AWigth7_x2DUm9/view?usp=share_link"> Predicting The Value of Order using Linear Regression </a> <|file_sep|>Data-Analytics-Portfolio-main/Dashboard/Readme.md # Skillset Dataviz: - Connect and combine/ join datasets - Data formatting - Visualization - Calculated field - Interactive Dashboard ## Dashboard : 1. <a href="https://lookerstudio.google.com/reporting/653b8112-1059-42a9-92d2-ebf8ce79b3d5"> Executive Dashboard - Looker Studio</a> 2. <a href="https://public.tableau.com/views/W10W11_alfiana_ramdhan_intermediate/SambaDashboard?:language=en-GB&publish=yes&:display_count=n&:origin=viz_share_link"> Executive Dashboard - Tableau</a> ---- # Group Final Project <a href="https://drive.google.com/file/d/1_eyCvWRKKPaKEyyBk32ru90UqPDU4jc8/view?usp=sharing"> Resort & City Hotel Performance Analysis</a> <|file_sep|>Data-Analytics-Portfolio-main/Propensity Model & Cost Benefit Analysis/Readme.md # Python Skillset : - Data cleaning - String manipulation - Combine & merge datasets - Data aggregation - Descriptive statistic - Analyzing using visualization - Regression Analysis ## Predicting User Activation using XGBoost Classifier : <a href="https://colab.research.google.com/drive/1PwxvxIwUFRp4a29qdqVl9gc_-5L4eRZ9?usp=sharing"> Google Colab </a> ## Situation ## Background For 3 months between February and April 2023, the RevoBank Card Partnership Tribe has successfully implemented the installment feature or PayLater in Revoshop which aims to increase credit card usage. This service allows customers to convert e-commerce transactions into fixed installments with low interest rates. ## Problem Definition As a success of this pilot program, the tribe leader plans Project Contact to 30,000 Revoshop customers who have never used the PayLater feature via phone call, offering a welcome bonus of 1000 reward points (worth 100 euros) if they activate and use PayLater for transactions. As a data analyst, my role is to develop propensity models that predict which customers are most likely to use PayLater features. Then I can use the model to present a cost-benefit analysis of the project. ## Objective The goal of this project is to build a propensity model to predict which customers are most likely to use PayLater features and perform a cost-benefit analysis to assess the potential impact of Project Contact. ## Task & Actions - Import promotion data and Revobank paylater data into Google Colab -> Use Python libraries including pandas and numpy -> To load dataset and perform data cleaning - Identify important columns that can be used for joining, create target variables and create new features -> Use Python libraries including pandas, numpy, seaborn and matplotlib to analyze and visualize data -> To prepare data for propensity model - Build a model using train data and apply the trained model to the test dataset and evaluate performance Use python libraries including LogisticRegression and XGBoost Classifier to build model -> To train data, evaluate the model and identify the most promising pay-later customers - Combine the model probability and the dataset (30,000 Revoshop customers who have never used the PayLater feature) -> Use python libraries including LogisticRegression and XGBoost Classifier to build model -> To apply the model to calculate the probability of customers using the pay-later - Utilize the benefit-cost analysis template -> Use spreadsheets -> To assess the potential impact of project contact ## Result The result of this project as follows: - The **XGBoost Classifier** model is quite effective for identifying promising PayLater customers, shown by the High Precision and Decile-Based performance results. However, there is still room for improvement, especially in increasing t ... (remaining file content omitted) ... <|file_sep|>Data-Analytics-Portfolio-main/Hypothesis Testing/Readme.md # Spreadsheet/ Excel Skill sets: - Data Cleaning; - Descriptive Statistics; - Data Visualization; - Gathering Insights; - A/B Testing - Correlation Analysis - Regression Linear # A/B Hypothesis Testing on Purchase Value <a href="https://docs.google.com/spreadsheets/d/1rLN1GD9aw2Y7kE9KJqgB7KyZc_KSrc1PxmeDv-a9ri0/edit?usp=sharing"> Google Sheets</a> ## Situation ### Problem Definition Luxura is an e-commerce company that has exclusive partnerships with top brands such as Adibi, Balena and Cellina. In this case, all the bosses in the company wanted to prioritize Adibi because it paid the highest fee to the company. However, Head of Data believes we need to take a look at the purchase performance first. So my role as a data analyst is to identify whether Adibi has the best purchase performance out of the 2 brands? ### Objective The aim of this project is to identify whether Adibi has the best purchase performance out of the 2 brands? ### Task & Actions Data gathering -> Collect data Luxura Purchase Data Data Cleaning -> Use tools on Spreadsheets to clean and prepare data Data Analysis -> Conduct EDA and hypothesis testing to find patterns and insights using XLMiner Analysis Toolpak on Spreadsheets ### Result - Adibi is the product with the lowest purchase of all brands in terms of value for money, but the promotion rate is relatively the lowest. Hence, partnering with Luxura could be one of the solution to increase Adibi’s promotions - We may need to create a membership points or member program that can increase the revenue and growth of not-married users. - We are also able to create promotions targeting low and middle income groups as we know that our purchasing base is made up of low to middle income groups. - Based on the hypothesis test using the t-test, a p-value of less than 0.05 is obtained, which means we reject the null hypothesis. - Cellina > Balena > Adibi -> significant different on average amount spent. It means that Cellina’s highest average amount spent is absolute. - Because Cellina has the absolutely the highest average amount spent, we could learn from Cellina’s promotion. Specifically learning on the demography of Cellina users would also be advisable. - Because there is significant difference of average amount spent between brand, it means that brands performance are different. Thus, the strategy to uplift Adibi amount spent would be personalized to Adibi characteristics. We need to know further on what variables are influencing Adibi amount spent. Therefore, regression would be advised ## Deck : <a href="https://drive.google.com/file/d/1HSxIHyvCM-87c-O_prhnYnC4WEbTXYvK/view?usp=share_link"> A/B Hypothesis Testing on Purchase Value</a> <|file_sep|>Data-Analytics-Portfolio-main/Cohort Analysis/Readme.md # SQL Skill sets: - Standard Query Syntax - SQL Aggregate Functions - SQL Joins - SQL Data Type - SQL Date Format - SQL Window Function - CTE # Entity Relationship Diagram ![alt text](https://github.com/alfiramdhan/Data-Analytics-Portfolio/blob/main/Cohort%20Analysis/ERD.png) ## Supply Chain Analysis in Fashion Company ## Situation ### Background The fashion e-commerce company is currently in the optimization mode due to the potential crisis in 2023. Therefore, management decided to cut resources in several categories with the lowest growth in the last 1 year. As a data analyst supporting the business, my role is to analyze retention cohort based on customer purchases and identify monthly inventory growth to provide actionable insights to management to make data-driven decisions ### Problem Definition The potential crisis in 2023 is a major concern for many industries including fashion e-commerce companies because it will have a negative impact on their income and production. A crisis can lead to a decrease in revenue due to a decrease in consumption expenditure and customer retention. This can also harm the company's inventory growth by decreasing production quantities. Therefore, it is important for companies to identify which resource categories will have the lowest growth in 2022 to be immune from a potential crisis. ### Objective The goal of this project is to identify monthly inventory growth trends and measure customer retention ### Task & Actions - Collect inventory data -> Collect inventory data from Google BigQuery -> To identify trends and pattern in growth of inventory - Identify inventory data -> Use SQL Advance (CTE, Window Function) to get monthly inventory growth in each product category -> To identify which product category has lowest growth - Collect order data -> Collect order data from Google BigQuery -> To determine what data are needed for cohort analysis - Create monthly retention cohort -> Use SQL Advance (CTE, Window Function) to create monthly retention cohort -> To measure customer retention based on their behavior and find out whether user engagement is actually getting better over time or just appearing to increase due to growth ### Result The result of this project is that there are seasonal and non-seasonal product categories based on customer behavior, where Active Products, Socks & Hosiery, and Underwear have the lowest average inventory growth, so these products can be considered for the disconnected resource category. Then customers who start buying products in the winter have a lower retention rate than those who start in the summer. Based on these findings, marketing teams need to improve user experience, offer incentives to encourage users to return, or adjust marketing strategies to target specific groups. And for further analysis it is necessar ... (remaining file content omitted) ...
Jagadeesh-176/Fetch-And-Routing-Practice-React-JS-CP-23
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: Provide a **detailed summary** that comprehensively explains: * The overall purpose and functionality of the repository. * The main technologies, frameworks, and libraries used. * The general workflow or logic of how the repository operates. * The organization and structure of the codebase, including important directories or modules and their roles. 2. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the two fields. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository, generate a **detailed summary** as described above. Then, based on the evaluation criteria, conclude with the rating. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Detailed summary of the repository's purpose, technologies, workflow, and structure] Rating: 5 ``` REPOSITORY: Jagadeesh-176/Fetch-And-Routing-Practice-React-JS-CP-23 Code to be assessed: <|repo_name|>Jagadeesh-176/Fetch-And-Routing-Practice-React-JS-CP-23 <|file_sep|>Fetch-And-Routing-Practice-React-JS-CP-23-main/pnpm-lock.yaml lockfileVersion: 5.3 specifiers: '@testing-library/jest-dom': 5.11.9 '@testing-library/react': 11.2.5 '@testing-library/user-event': 12.6.2 chalk: 4.1.0 eslint-config-airbnb: 18.2.1 eslint-config-prettier: 8.1.0 eslint-plugin-prettier: 3.3.1 history: 5.0.0 husky: 4.3.8 lint-staged: 10.5.4 msw: 0.28.1 npm-run-all: 4.1.5 prettier: 2.2.1 react: 17.0.1 react-dom: 17.0.1 react-loader-spinner: 4.0.0 react-router-dom: 5.2.0 react-scripts: 4.0.3 dependencies: '@testing-library/jest-dom': 5.11.9 '@testing-library/react': [email protected][email protected] '@testing-library/user-event': 12.6.2 chalk: 4.1.0 history: 5.0.0 msw: 0.28.1 react: 17.0.1 react-dom: [email protected] react-loader-spinner: [email protected][email protected] react-router-dom: [email protected] devDependencies: eslint-config-airbnb: 18.2.1 eslint-config-prettier: 8.1.0 eslint-plugin-prettier: 3.3.1_a5f306c245f9405bc973aa159985476e husky: 4.3.8 lint-staged: 10.5.4 npm-run-all: 4.1.5 prettier: 2.2.1 react-scripts: [email protected] packages: /@aashutoshrathi/word-wrap/1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} dev: true /@ampproject/remapping/2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 dev: true /@babel/code-frame/7.10.4: resolution: {integrity: sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==} dependencies: '@babel/highlight': 7.22.10 dev: true /@babel/code-frame/7.12.11: resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} dependencies: '@babel/highlight': 7.22.10 dev: true /@babel/code-frame/7.22.10: resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.22.10 chalk: 2.4.2 /@babel/compat-data/7.22.9: resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} dev: true /@babel/core/7.12.3: resolution: {integrity: sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.10 '@babel/generator': 7.22.10 '@babel/helper-module-transforms': 7.22.9_@[email protected] ... (remaining file content omitted) ...
JosephCropper/cs121Final
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: JosephCropper/cs121Final Repository Tree: └── cs121Final-main ├── rawFiles │ ├── Resources │ │ └── PokemonData │ └── src │ ├── BattleManager.java │ ├── Main.java │ ├── Move.java │ ├── MoveManager.java │ ├── Pokemon.java │ ├── Team.java │ └── TeamBuilder.java └── README.md Code to be assessed: <|repo_name|>JosephCropper/cs121Final <|file_sep|>cs121Final-main/README.md # cs121Final Go figure, theres a lot of data in pokemon. Unfortunately, when i attempted to use an API, i ran into issues where there was too much data to import, and it would cut off early. So all of this had to be entered by hand. Since there is... a LOT of data, consider this more a proof-of-concept rather than a fully finished pokemon sim. A solid portion of code is infastructure for things i didn't even have time to impliment. Use the example team i managed to make data for: Pokemon Name: spiritomb moves: dark_pulse, silver_wind, ominous_wind, psychic Ability: pressure EVs: +252Spatk, +252Speed, +4Spdef Nature: +6, -2 Pokemon Name: roserade moves: Energy_Ball, Sludge_Bomb, Shadow_Ball, Extrasensory Ability: none EVs: +252Spatk, +252Speed, +4HP Nature: +6, -2 Pokemon Name: Togekiss moves: Air_Slash, Aura_Sphere, Ancient_Power, Psychic Ability: Serene_Grace EVs: +252Spatk, +252Speed, +4Hp Nature: +6, -2 Pokemon Name: lucario moves: swords_dance, close_combat, meteor_mash, extreme_speed Ability: inner_focus EVs: +252atk, +252Speed, +4hp Nature: +2, -4 Pokemon Name: milotic moves: scald, recover, ice_beam, toxic Ability: miracle_scale EVs: +252def, +4spdef, +252hp Nature: +5, -2 Pokemon Name: garchomp moves: swords_dance, earthquake, dragon_claw, giga_impact Ability: rough_skin EVs: +252atk, +252Speed, +4Hp Nature: +6, -4 # Algorithms ## Main ``` Creates a battleManager and teamManager instance Basic input loop to manage the main menu - Battle (runs battlemanager's start with the teammanager instance) - Team Builder (runs teammanager's start, feeding itself the overall team list) - Exit (saves teams and exits) ``` ## BattleManager ``` Checks if there are 2 teams that can be used for battle Allows players to select Allows players to select their starting pokemon Begins the standard battle loop - Get faster pokemon's input (use move OR switch mons) - Get slower pokemon's input (use move OR switch mons) - use the selected moves with a MoveManager instance - final turn checks such as status, timers, and stun ``` ## MoveManager ``` Holds all move data, including all created moves and their secondary abilities When given the two active mons and the moves used, will use the moves and apply the necessary changes ``` ## TeamBuilder ``` Allows user to access and create teams Teams accessed can have their names and pokemon data changed, the team can be saved or the data can be discarded Accessed pokemon can have all their data edited, such as moves, ability, item*, and EVs All data is saved via serialization ``` ## Move ``` Holds standard data for the Move datatype, such as name, damage, etc. ``` ## Pokemon ``` Holds standard data for the Pokemon dataty ... (remaining file content omitted) ... <|file_sep|>cs121Final-main/rawFiles/src/BattleManager.java <Error> <|file_sep|>cs121Final-main/rawFiles/src/Pokemon.java <Error> <|file_sep|>cs121Final-main/rawFiles/src/Team.java <Error> <|file_sep|>cs121Final-main/rawFiles/src/Main.java <Error> <|file_sep|>cs121Final-main/rawFiles/Resources/PokemonData empty empty ---- Spiritomb Dark Ghost 50 92 108 92 109 35 { Pressure Infiltrator } [ Calm_Mind Confide Curse Dark_Pulse Dream_Eater Facade Feint_Attack Frustration Giga_Impact Hyper_Beam Hypnosis Icy_Wind Infestation Nasty_Plot Ominous_Wind Pain_Split Psychic Rain_Dance Rest Rock_Tomb Round Secret_Power Shadow_Ball Shadow_Sneak Shock_Wave Silver_Wind Sleep_Talk Smokescreen Snarl Snatch Snore Spite Substitute Sucker_Punch Sunny_Day Swagger Taunt Telekinesis Thief Torment Toxic Trick Uproar Water_Pulse Will-O-Wisp Wonder_Room ] ---- Roserade Grass Poison 60 70 65 125 105 90 { Natural_Cure Poison_Point Technician } [ Absorb Aromatherapy Attract Body_Slam Bullet_Seed Captivate Confide Cotton_Spore Covet Cut Dazzling_Gleam Double-Edge Double_Team Endure Energy_Ball Extrasensory Facade Flash Frustration Fury_Cutter Giga_Drain Giga_Impact Grass_Knot Grass_Whistle Grassy_Terrain Growth Hidden_Power Hyper_Beam Ingrain Laser_Focus Leaf_Storm Leech_Seed Magical_Leaf Mega_Drain Mimic Mind_Reader Mud-Slap Natural_Gift Nature_Power Nightmare Petal_Blizzard Petal_Dance Pin_Missile Poison_Jab Poison_Sting Power_Whip Protect Psych_Up Rain_Dance Razor_Leaf Rest Return Round Secret_Power Seed_Bomb Shadow_Ball Sleep_Powder Sleep_Talk Sludge_Bomb Snore Solar_Beam Spikes Stun_Spore Substitute Sunny_Day Swagger Sweet_Kiss Sweet_Scent Swift Swords_Dance Synthesis Toxic Toxic_Spikes Uproar Venom_Drench Venoshock Water_Sport Weather_Ball Worry_Seed ] ---- Togekiss Fairy Flying 85 50 95 120 115 80 { Hustle Serene_Grace Super_Luck } [ Aerial_Ace After_You Air_Cutter Air_Slash Ancient_Power Attract Aura_Sphere Baton_Pass Bestow Body_Slam Brick_Break Captivate Charm Confide Counter Covet Curse Dazzling_Gleam Defense_Curl Defog Detect Double-Edge Double_Team Drain_Punch Dream_Eater Echoed_Voice Encore Endeavor Endure Extrasensory Extreme_Speed Facade Fairy_Wind Fire_Blast Flamethrower Flash Fling Fly Focus_Punch Follow_Me Foresight Frustration Future_Sight Giga_Impact Grass_Knot Growl Headbutt Heal_Bell Heat_Wave Helping_Hand Hidden_Power Hyper_Beam Hyper_Voice Incinerate Laser_Focus Last_Resort Light_Screen Lucky_Chant Magical_Leaf Magic_Coat Mega_Kick Mega_Punch Metronome Mimic Mirror_Move Morning_Sun Mud-Slap Nasty_Plot Natural_Gift Ominous_Wind Peck Pluck Present Protect Psychic Psycho_Shift Psych_Up Psyshock Rain_Dance Reflect Rest Retaliate Return Rock_Smash Rollout Roost Round Safeguard Secret_Power Seismic_Toss Shadow_Ball Shock_Wave Signal_Beam Silver_Wind Sky_Attack Sleep_Talk Smart_Strike Snore Soft-Boiled Solar_Beam Steel_Wing Stored_Power Substitute Sunny_Day Swagger Sweet_Kiss Swift Tailwind Telekinesis Thunder_Wave Toxic Tri_Attack Trick Twister Uproar Water_Pulse Wish Work_Up Yawn Zap_Cannon Zen_Headbutt ] ---- Lucario Fighting Steel 70 110 70 115 70 90 { Steadfast Inner_Focus Justified } [ Agility Attract Aura_Sp ... (remaining file content omitted) ... <|file_sep|>cs121Final-main/rawFiles/src/MoveManager.java <Error> <|file_sep|>cs121Final-main/rawFiles/src/Move.java <Error> <|file_sep|>cs121Final-main/rawFiles/src/TeamBuilder.java <Error>
hqdat95/SERN-eCommerce-BE
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: hqdat95/SERN-eCommerce-BE Repository Tree: └── E-Commerce-BE-main ├── src │ ├── configs │ │ └── auth.config.js │ ├── constants │ │ ├── index.js │ │ └── role.constant.js │ ├── controllers │ │ └── home.controller.js │ ├── core │ │ ├── error.response.js │ │ └── success.response.js │ ├── databases │ │ ├── migrations │ │ │ ├── 20231012034431-create-user.js │ │ │ ├── 20231012034629-create-category.js │ │ │ ├── 20231012034723-create-product.js │ │ │ ├── 20231012035013-create-product-image.js │ │ │ ├── 20231012035231-create-transport-info.js │ │ │ ├── 20231012035438-create-cart-item.js │ │ │ ├── 20231012035723-create-order.js │ │ │ ├── 20231012035827-create-order-item.js │ │ │ └── 20231012035932-create-payment.js │ │ └── seeders │ │ └── admin.seed.js │ ├── middlewares │ │ ├── error.middleware.js │ │ ├── index.js │ │ └── session.middleware.js │ ├── models │ │ ├── cart-item.model.js │ │ ├── category.model.js │ │ ├── order-item.model.js │ │ ├── order.model.js │ │ ├── payment.model.js │ │ ├── product-image.model.js │ │ ├── product.model.js │ │ ├── transport-info.model.js │ │ └── user.model.js │ ├── routes │ │ └── home.routes.js │ └── app.js ├── .env.example ├── README.md ├── docker-compose.yml ├── package.json └── yarn.lock Code to be assessed: <|repo_name|>hqdat95/SERN-eCommerce-BE <|file_sep|>E-Commerce-BE-main/README.md # SERN E-Commerce Backend <|file_sep|>E-Commerce-BE-main/docker-compose.yml version: '3.8' services: mysql: container_name: SERN-MySQL image: mysql:latest restart: always environment: - MYSQL_DATABASE=${DB_DATABASE} - MYSQL_ROOT_PASSWORD=${DB_PASSWORD} ports: - '${DB_PORT}:3306' command: ['--default-authentication-plugin=mysql_native_password'] volumes: - ./data/mysql:/var/lib/mysql networks: - common redis: container_name: SERN-Redis image: redis:latest restart: always ports: - '${REDIS_PORT}:6379' volumes: - ./data/redis/redis.conf:/data/redis.conf command: redis-server /data/redis.conf --requirepass '${REDIS_PASSWORD}' --appendonly yes --save "" --protected-mode no --dir /data networks: - common networks: common: driver: bridge <|file_sep|>E-Commerce-BE-main/src/middlewares/session.middleware.js import session from 'express-session'; import RedisStore from 'connect-redis'; import redis from '../redis/connect.redis'; import secret from '../configs/auth.config'; export default session({ store: new RedisStore({ client: redis, ttl: 24 * 60 * 60, }), secret: secret.SESSION, resave: false, saveUninitialized: false, cookie: { maxAge: 24 * 60 * 60 * 1000, }, }); <|file_sep|>E-Commerce-BE-main/src/configs/auth.config.js export default { SESSION: process.env.SESSION_SECRET, }; <|file_sep|>E-Commerce-BE-main/src/routes/home.routes.js import { Router } from 'express'; import { async } from '../middlewares'; import { homeCtrl } from '../controllers/home.controller'; const router = Router(); router.get('/', async(homeCtrl)); export default router; <|file_sep|>E-Commerce-BE-main/src/middlewares/error.middleware.js import { Status, Reason } from '../constants'; import { mapResponse } from '../core/error.response'; export default (err, req, res, next) => { const statusCode = err.status || Status.INTERNAL_SERVER_ERROR; const message = err.message || Reason.INTERNAL_SERVER_ERROR; const reason = mapResponse[statusCode] || Reason.INTERNAL_SERVER_ERROR; const stack = statusCode >= Status.INTERNAL_SERVER_ERROR ? err.stack : `ERROR: ${message}`; res.status(statusCode).json({ status: statusCode, reason, message: stack }); }; <|file_sep|>E-Commerce-BE-main/src/app.js import 'dotenv/config'; import cors from 'cors'; import helmet from 'helmet'; import express from 'express'; import compression from 'compression'; import db from './models'; import routes from './routes'; import viewEngine from './configs/view.config'; import { morgan, session, response, notFound, errorHandler } from './middlewares'; const app = express(); db.connectDB(); viewEngine(app); app.use(cors()); app.use(morgan()); app.use(helmet()); app.use(compression()); app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(session); app.use(response); app.use('/v1/api', routes); app.use(notFound); app.use(errorHandler); export default app; <|file_sep|>E-Commerce-BE-main/src/databases/seeders/admin.seed.js import bcrypt from 'bcryptjs'; import { Roles } from '../../constants'; export default { up: async (queryInterface, Sequelize) => { const isExist = await queryInterface.sequelize.query( `SELECT * FROM users WHERE role = '${Roles.ADMIN}'`, { type: queryInterface.sequelize.QueryTypes.SELECT, }, ); if (isExist.length === 0) { const admin = { id: Sequelize.literal('UUID()'), username: process.env.ADMIN_USERNAME, email: process.env.ADMIN_EMAIL, password: await bcrypt.hashSync(process.env.ADMIN_PASSWORD, 10), role: Roles.ADMIN, createdAt: new Date(), updatedAt: new Date(), }; await queryInterface.bulkInsert('users', [admin]); } }, down: async (queryInterface, Sequelize) => { await queryInterface.bulkDelete('users', null, {}); }, }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012035438-create-cart-item.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('cart_items', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, quantity: { type: Sequelize.INTEGER, allowNull: false, }, userId: { type: Sequelize.UUID, allowNull: false, references: { model: 'users', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, productId: { type: Sequelize.UUID, allowNull: false, references: { model: 'products', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, allowNull: true, defaultValue: null, }, }); await queryInterface.addConstraint('cart_items', { fields: ['userId'], type: 'foreign key', name: 'fk_cart_items_userId', references: { table: 'users', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); await queryInterface.addConstraint('cart_items', { fields: ['productId'], type: 'foreign key', name: 'fk_cart_items_productId', references: { table: 'products', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('cart_items', 'fk_cart_items_userId'); await queryInterface.removeConstraint('cart_items', 'fk_cart_items_productId'); await queryInterface.dropTable('cart_items'); }, }; <|file_sep|>E-Commerce-BE-main/src/core/error.response.js import { Reason, Status } from '../constants'; class ERROR extends Error { constructor(message, status) { super(message); this.status = status; } } export class BadRequest extends ERROR { constructor(message = Reason.BAD_REQUEST, status = Status.BAD_REQUEST) { super(message, status); } } export class Unauthorized extends ERROR { constructor(message = Reason.UNAUTHORIZED, status = Status.UNAUTHORIZED) { super(message, status); } } export class Forbidden extends ERROR { constructor(message = Reason.FORBIDDEN, status = Status.FORBIDDEN) { super(message, status); } } export class NotFound extends ERROR { constructor(message = Reason.NOT_FOUND, status = Status.NOT_FOUND) { super(message, status); } } export class Conflict extends ERROR { constructor(message = Reason.CONFLICT, status = Status.CONFLICT) { super(message, status); } } export class UnprocessableEntity extends Error { constructor(message = Reason.UNPROCESSABLE_ENTITY, status = Status.UNPROCESSABLE_ENTITY) { super(message, status); } } export const mapResponse = { [Status.BAD_REQUEST]: Reason.BAD_REQUEST, [Status.UNAUTHORIZED]: Reason.UNAUTHORIZED, [Status.FORBIDDEN]: Reason.FORBIDDEN, [Status.NOT_FOUND]: Reason.NOT_FOUND, [Status.CONFLICT]: Reason.CONFLICT, [Status.UNPROCESSABLE_ENTITY]: Reason.UNPROCESSABLE_ENTITY, }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012034431-create-user.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('users', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, username: { type: Sequelize.STRING, allowNull: false, }, email: { type: Sequelize.STRING, allowNull: false, unique: true, }, password: { type: Sequelize.STRING, }, role: { type: Sequelize.STRING, allowNull: false, }, isGoogleLogin: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false, }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); }, async down(queryInterface, Sequelize) { await queryInterface.dropTable('users'); }, }; <|file_sep|>E-Commerce-BE-main/src/models/order.model.js import { Model } from 'sequelize'; class Order extends Model { static associate(models) { this.belongsTo(models.User, { foreignKey: 'userId', as: 'user', }); this.hasMany(models.OrderItem, { foreignKey: 'orderId', as: 'orderItems', }); this.hasOne(models.TransportInfo, { foreignKey: 'orderId', as: 'transportInfo', }); this.hasOne(models.Payment, { foreignKey: 'orderId', as: 'payment', }); } } export default (sequelize, DataTypes) => { Order.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, totalPrice: { type: DataTypes.DECIMAL(10, 2), allowNull: false, }, status: { type: DataTypes.ENUM('pending', 'confirmed', 'shipping', 'delivered', 'cancelled'), allowNull: false, defaultValue: 'pending', }, isPaid: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, }, userId: { type: DataTypes.UUID, allowNull: false, }, transportInfoId: { type: DataTypes.UUID, allowNull: false, }, }, { sequelize, modelName: 'Order', tableName: 'orders', timestamps: true, paranoid: true, }, ); return Order; }; <|file_sep|>E-Commerce-BE-main/src/models/product-image.model.js import { Model } from 'sequelize'; class ProductImage extends Model { static associate(models) { this.belongsTo(models.Product, { foreignKey: 'productId', as: 'product', }); } } export default (sequelize, DataTypes) => { ProductImage.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, url: { type: DataTypes.STRING, allowNull: false, }, productId: { type: DataTypes.UUID, allowNull: false, }, }, { sequelize, modelName: 'ProductImage', tableName: 'product_images', timestamps: true, paranoid: true, }, ); return ProductImage; }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012035932-create-payment.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('payments', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, method: { type: Sequelize.ENUM('cod', 'stripe'), allowNull: false, defaultValue: 'cod', }, amount: { type: Sequelize.DECIMAL(10, 2), allowNull: false, }, orderId: { type: Sequelize.UUID, allowNull: false, references: { model: 'orders', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); await queryInterface.addConstraint('payments', { fields: ['orderId'], type: 'foreign key', name: 'fk_payments_orderId', references: { table: 'orders', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('payments', 'fk_payments_orderId'); await queryInterface.dropTable('payments'); }, }; <|file_sep|>E-Commerce-BE-main/src/models/user.model.js import bcrypt from 'bcryptjs'; import { Model } from 'sequelize'; import { Roles } from '../constants'; class User extends Model { static associate(models) { this.hasMany(models.Order, { foreignKey: 'userId', as: 'order', }); this.hasMany(models.TransportInfo, { foreignKey: 'userId', as: 'transportInfo', }); } } export default (sequelize, DataTypes) => { User.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, username: { type: DataTypes.STRING, allowNull: false, }, email: { type: DataTypes.STRING, allowNull: false, unique: true, }, password: { type: DataTypes.STRING, }, role: { type: DataTypes.ENUM, values: Object.values(Roles), allowNull: false, defaultValue: Roles.CUSTOMER, }, isGoogleLogin: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, }, }, { sequelize, modelName: 'User', tableName: 'users', timestamps: true, paranoid: true, }, ); const hashPassword = async (user) => { if (user.password || user.changed('password')) { user.password = await bcrypt.hashSync(user.password, 10); } }; User.beforeCreate(hashPassword); User.beforeUpdate(hashPassword); User.prototype.toJSON = function () { if (this instanceof User) { const user = { ...this.get() }; delete user.password; return user; } }; return User; }; <|file_sep|>E-Commerce-BE-main/src/models/payment.model.js import { Model } from 'sequelize'; class Payment extends Model { static associate(models) { this.hasOne(models.Order, { foreignKey: 'orderId', as: 'order', }); } } export default (sequelize, DataTypes) => { Payment.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, method: { type: DataTypes.ENUM('cod', 'stripe'), allowNull: false, defaultValue: 'cod', }, amount: { type: DataTypes.DECIMAL(10, 2), allowNull: false, }, orderId: { type: DataTypes.UUID, allowNull: false, }, }, { sequelize, modelName: 'Payment', tableName: 'payments', timestamps: true, paranoid: true, }, ); return Payment; }; <|file_sep|>E-Commerce-BE-main/src/models/product.model.js import { Model } from 'sequelize'; class Product extends Model { static associate(models) { this.belongsTo(models.Category, { foreignKey: 'categoryId', as: 'category', }); this.hasMany(models.ProductImage, { foreignKey: 'productId', as: 'image', }); this.hasMany(models.OrderItem, { foreignKey: 'productId', as: 'orderItem', }); } } export default (sequelize, DataTypes) => { Product.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, name: { type: DataTypes.STRING, allowNull: false, }, description: { type: DataTypes.TEXT, }, price: { type: DataTypes.DECIMAL(10, 2), allowNull: false, }, quantity: { type: DataTypes.INTEGER, allowNull: false, }, categoryId: { type: DataTypes.UUID, allowNull: false, }, }, { sequelize, modelName: 'Product', tableName: 'products', timestamps: true, paranoid: true, }, ); return Product; }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012035231-create-transport-info.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('transport_infos', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, name: { type: Sequelize.STRING, allowNull: false, }, phone: { type: Sequelize.STRING, allowNull: false, }, address: { type: Sequelize.TEXT, allowNull: false, }, userId: { type: Sequelize.UUID, references: { model: 'users', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, isDefault: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false, }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); await queryInterface.addConstraint('transport_infos', { fields: ['userId'], type: 'foreign key', name: 'fk_transport_infos_userId', references: { table: 'users', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('transport_infos', 'fk_transport_infos_userId'); await queryInterface.dropTable('transport_infos'); }, }; <|file_sep|>E-Commerce-BE-main/src/constants/role.constant.js export default { ADMIN: 'admin', MODERATOR: 'moderator', CUSTOMER: 'customer', }; <|file_sep|>E-Commerce-BE-main/src/models/transport-info.model.js import { Model } from 'sequelize'; class TransportInfo extends Model { static associate(models) { this.belongsTo(models.User, { foreignKey: 'transportInfoId', as: 'user', }); } } export default (sequelize, DataTypes) => { TransportInfo.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, name: { type: DataTypes.STRING, allowNull: false, }, phone: { type: DataTypes.STRING, allowNull: false, }, address: { type: DataTypes.TEXT, allowNull: false, }, userId: { type: DataTypes.UUID, }, isDefault: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, }, }, { sequelize, modelName: 'TransportInfo', tableName: 'transport_infos', timestamps: true, paranoid: true, }, ); return TransportInfo; }; <|file_sep|>E-Commerce-BE-main/src/controllers/home.controller.js export const homeCtrl = async (req, res) => { res.ok('Welcome to website'); }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012034629-create-category.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('categories', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, name: { type: Sequelize.STRING, allowNull: false, }, parentId: { type: Sequelize.UUID, allowNull: true, references: { model: 'categories', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); await queryInterface.addConstraint('categories', { fields: ['parentId'], type: 'foreign key', name: 'fk_categories_parentId', references: { table: 'categories', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('categories', 'fk_categories_parentId'); await queryInterface.dropTable('categories'); }, }; <|file_sep|>E-Commerce-BE-main/src/core/success.response.js import { Reason, Status } from '../constants'; export class Success { constructor(res) { this.res = res; this.messageMap = { [Reason.OK]: Reason.OK, [Reason.CREATED]: Reason.CREATED, }; } send(reason, status, data) { const message = this.messageMap[reason] || 'Success'; const response = { reason: message, status, data: typeof data === 'string' ? { message: data } : data, }; this.res.status(status).json(response); } ok(data) { this.send(Reason.OK, Status.OK, data); } created(data) { this.send(Reason.CREATED, Status.CREATED, data); } } <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012034723-create-product.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('products', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, name: { type: Sequelize.STRING, allowNull: false, }, description: { type: Sequelize.TEXT, }, price: { type: Sequelize.DECIMAL(10, 2), allowNull: false, }, quantity: { type: Sequelize.INTEGER, allowNull: false, }, categoryId: { type: Sequelize.UUID, allowNull: false, references: { model: 'categories', key: 'id', onDelete: 'CASCADE', onUpdate: 'CASCADE', }, }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); await queryInterface.addConstraint('products', { fields: ['categoryId'], type: 'foreign key', name: 'fk_products_categoryId', references: { table: 'categories', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('products', 'fk_products_categoryId'); await queryInterface.dropTable('products'); }, }; <|file_sep|>E-Commerce-BE-main/src/models/category.model.js import { Model } from 'sequelize'; class Category extends Model { static associate(models) { this.hasMany(models.Category, { foreignKey: 'parentId', as: 'children', }); this.belongsTo(models.Category, { foreignKey: 'parentId', as: 'parent', }); this.hasMany(models.Product, { foreignKey: 'categoryId', as: 'products', }); } } export default (sequelize, DataTypes) => { Category.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, name: { type: DataTypes.STRING, allowNull: false, }, parentId: { type: DataTypes.UUID, allowNull: true, }, }, { sequelize, modelName: 'Category', tableName: 'categories', timestamps: true, paranoid: true, }, ); return Category; }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012035723-create-order.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('orders', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, totalPrice: { type: Sequelize.DECIMAL(10, 2), allowNull: false, }, statusOrder: { type: Sequelize.ENUM('pending', 'confirmed', 'shipping', 'delivered', 'cancelled'), defaultValue: 'pending', allowNull: false, }, isPaid: { type: Sequelize.BOOLEAN, defaultValue: false, allowNull: false, }, userId: { type: Sequelize.UUID, allowNull: false, references: { model: 'users', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, transportInfoId: { type: Sequelize.UUID, allowNull: false, references: { model: 'transport_infos', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); await queryInterface.addConstraint('orders', { fields: ['userId'], type: 'foreign key', name: 'fk_orders_userId', references: { table: 'users', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); await queryInterface.addConstraint('orders', { fields: ['transportInfoId'], type: 'foreign key', name: 'fk_orders_transportInfoId', references: { table: 'transport_infos', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('orders', 'fk_orders_userId'); await queryInterface.removeConstraint('orders', 'fk_orders_transportInfoId'); await queryInterface.dropTable('orders'); }, }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012035827-create-order-item.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('order_items', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, quantity: { type: Sequelize.INTEGER, allowNull: false, }, price: { type: Sequelize.DECIMAL(10, 2), allowNull: false, }, orderId: { type: Sequelize.UUID, allowNull: false, references: { model: 'orders', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, productId: { type: Sequelize.UUID, allowNull: false, references: { model: 'products', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); await queryInterface.addConstraint('order_items', { fields: ['orderId'], type: 'foreign key', name: 'fk_order_items_orderId', references: { table: 'orders', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); await queryInterface.addConstraint('order_items', { fields: ['productId'], type: 'foreign key', name: 'fk_order_items_productId', references: { table: 'products', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('order_items', 'fk_order_items_orderId'); await queryInterface.removeConstraint('order_items', 'fk_order_items_productId'); await queryInterface.dropTable('order_items'); }, }; <|file_sep|>E-Commerce-BE-main/src/models/order-item.model.js import { Model } from 'sequelize'; class OrderItem extends Model { static associate(models) { this.belongsTo(models.Order, { foreignKey: 'orderId', as: 'order', }); this.belongsTo(models.Product, { foreignKey: 'productId', as: 'product', }); } } export default (sequelize, DataTypes) => { OrderItem.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, quantity: { type: DataTypes.INTEGER, allowNull: false, }, price: { type: DataTypes.DECIMAL(10, 2), allowNull: false, }, orderId: { type: DataTypes.UUID, allowNull: false, }, productId: { type: DataTypes.UUID, allowNull: false, }, }, { sequelize, modelName: 'OrderItem', tableName: 'order_items', timestamps: true, paranoid: true, }, ); return OrderItem; }; <|file_sep|>E-Commerce-BE-main/src/databases/migrations/20231012035013-create-product-image.js export default { async up(queryInterface, Sequelize) { await queryInterface.createTable('product_images', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true, allowNull: false, }, url: { type: Sequelize.STRING, allowNull: false, }, productId: { type: Sequelize.UUID, allowNull: false, references: { model: 'products', key: 'id', }, onDelete: 'CASCADE', onUpdate: 'CASCADE', }, createdAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, updatedAt: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW, }, deletedAt: { type: Sequelize.DATE, defaultValue: null, }, }); await queryInterface.addConstraint('product_images', { fields: ['productId'], type: 'foreign key', name: 'fk_product_images_productId', references: { table: 'products', field: 'id', }, onDelete: 'cascade', onUpdate: 'cascade', }); }, async down(queryInterface, Sequelize) { await queryInterface.removeConstraint('product_images', 'fk_product_images_productId'); await queryInterface.dropTable('product_images'); }, }; <|file_sep|>E-Commerce-BE-main/src/models/cart-item.model.js import { Model } from 'sequelize'; class CartItem extends Model { static associate(models) { this.belongsTo(models.User, { foreignKey: 'userId', as: 'user', }); this.belongsTo(models.Product, { foreignKey: 'productId', as: 'product', }); } } export default (sequelize, DataTypes) => { CartItem.init( { id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true, }, quantity: { type: DataTypes.INTEGER, allowNull: false, }, userId: { type: DataTypes.UUID, allowNull: false, }, productId: { type: DataTypes.UUID, allowNull: false, }, }, { sequelize, modelName: 'CartItem', tableName: 'cart_items', timestamps: true, paranoid: true, }, ); return CartItem; };
Sharp0802/ced
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: Sharp0802/ced Repository Tree: └── ced-master ├── .github │ └── workflows │ └── cargo-test.yml ├── src │ ├── editing_widget.rs │ ├── global.rs │ ├── global_widget.rs │ ├── input_handler.rs │ ├── main.rs │ └── widget.rs ├── Cargo.lock ├── Cargo.toml ├── LICENSE └── README.md Code to be assessed: <|repo_name|>Sharp0802/ced <|file_sep|>ced-master/README.md # *ced* : Code EDitor [![cargo test](https://github.com/Sharp0802/ced/actions/workflows/cargo-test.yml/badge.svg)](https://github.com/Sharp0802/ced/actions/workflows/cargo-test.yml) *ced* is tui text-editor written in Rust. ## Known issue - Backspace? Delete? Although Linux binds 7F for BACKSPACE by historical issue, *ced* regards 7F as DELETE instead of BACKSPACE. If you have a problem with BACKSPACE and DELETE, you should change your terminal-emulator's configuration. <|file_sep|>ced-master/src/main.rs mod editing_widget; mod input_handler; mod widget; mod global; mod global_widget; use crate::global::Global; use crate::global_widget::GlobalWidget; use crate::input_handler::InputHandler; use crate::widget::Widget; use nix::poll::{poll, PollFd, PollFlags}; use std::io::stdin; use std::os::fd::AsRawFd; fn main() { let getch = getch_rs::Getch::new(); let stdin = stdin().as_raw_fd(); let poll_fd = PollFd::new(stdin, PollFlags::POLLIN); let mut global = Global::new(); let mut global_widget = GlobalWidget::new(); let mut terminal = ratatui::init(); while !global.shutdown() { terminal.draw(|frame| { global_widget.draw(frame, frame.area(), &global); if poll(&mut [ poll_fd ], 15).unwrap() == 0 { return; } let key = match getch.getch() { Ok(key) => key, Err(_) => return, }; if global_widget.handle(&key, &global) { global.set_shutdown(); } }).unwrap(); } ratatui::restore(); } <|file_sep|>ced-master/src/global_widget.rs use std::fs::File; use std::io::Write; use crate::editing_widget::EditingWidget; use crate::global::Global; use crate::input_handler::InputHandler; use crate::widget::Widget; use getch_rs::Key; use nix::NixPath; use ratatui::layout::*; use ratatui::prelude::*; use ratatui::widgets::Block; pub struct GlobalWidget { editing_widget: EditingWidget, filename_widget: EditingWidget, filename: String, save_requested: bool, save_window_title: String, save_realm: String, } impl GlobalWidget { pub fn new() -> Self { let mut filename_widget = EditingWidget::single_line(); filename_widget.set_title("Name"); Self { editing_widget: EditingWidget::multi_line(), filename_widget, filename: String::new(), save_requested: false, save_window_title: String::new(), save_realm: String::new(), } } fn center(area: Rect, horizontal: Constraint, vertical: Constraint) -> Rect { let [area] = Layout::horizontal([horizontal]) .flex(Flex::Center) .areas(area); let [area] = Layout::vertical([vertical]) .flex(Flex::Center) .areas(area); area } fn set_filename(&mut self, filename: &str) { self.filename = filename.to_string(); self.editing_widget.set_title(filename); } fn request_save_as(&mut self) { self.save_requested = true; self.save_window_title = String::from("Save as..."); self.filename_widget.set_focused(true); self.editing_widget.set_focused(false); } fn request_save(&mut self) { self.save_requested = true; self.save_window_title = String::from("Save..."); self.filename_widget.set_focused(false); self.editing_widget.set_focused(false); } fn goto_top(&mut self) { self.save_requested = false; self.filename_widget.set_focused(false); self.editing_widget.set_focused(true); } } impl Widget for GlobalWidget { fn draw(&mut self, frame: &mut Frame, rect: Rect, global: &Global) { let [_, edit_rect, _] = Layout::default() .direction(Direction::Horizontal) .constraints(vec![ Constraint::Fill(1), Constraint::Length(72), Constraint::Fill(1), ]) .spacing(1) .split(rect)[..] else { unreachable!() }; self.editing_widget.draw(frame, edit_rect, &global); if self.save_requested { let dialog = Block::bordered() .title(self.save_window_title.clone()); let dialog_width = 32; let dialog_height = if self.filename_widget.get_focused() { 9 } else { 6 }; let realm_lines = (self.save_realm.l ... (remaining file content omitted) ... <|file_sep|>ced-master/src/editing_widget.rs use crate::global::Global; use crate::input_handler::InputHandler; use crate::widget::Widget; use getch_rs::Key; use ratatui::prelude::*; use ratatui::widgets::*; use ratatui::Frame; use std::cmp::min; use std::time::{SystemTime, UNIX_EPOCH}; pub struct EditingWidget { single_line: bool, title: String, content: String, cursor: usize, scroll: usize, focused: bool, } impl Widget for EditingWidget { fn draw(&mut self, frame: &mut Frame, rect: Rect, _global: &Global) { let block = Block::bordered() .title(self.title.clone()) .border_type(if self.single_line { BorderType::Rounded } else { BorderType::Plain }); let block_inner = block.inner(rect); let mut block_rect = rect; if self.single_line { block_rect.height = 3; } frame.render_widget(block, block_rect); let [_, mut content_rect, scrollbar_rect] = Layout::horizontal(vec![ Constraint::Length(1), Constraint::Fill(1), Constraint::Length(1), ]).split(block_inner)[..] else { unreachable!() }; if self.single_line { content_rect.height = 1; content_rect.width += 1; } let p = Paragraph::new(self.get_text()) .scroll((self.scroll as u16, 0)) .wrap(Wrap { trim: false }); frame.render_widget(p, content_rect); // scrollbar shouldn't be drawn when single-line mode if self.single_line { return; } let scrollbar = Scrollbar::new(ScrollbarOrientation::VerticalRight) .thumb_symbol("┃") .track_symbol(Some("│")) .begin_symbol(None) .end_symbol(None); let mut scrollbar_state = ScrollbarState::new(self.total_line()).position(self.scroll); frame.render_stateful_widget(scrollbar, scrollbar_rect, &mut scrollbar_state); } } impl EditingWidget { pub fn single_line() -> Self { Self { single_line: true, title: String::new(), content: String::new(), cursor: 0, scroll: 0, focused: true, } } pub fn multi_line() -> Self { Self { single_line: false, title: String::new(), content: String::new(), cursor: 0, scroll: 0, focused: true, } } pub fn set_title(&mut self, title: &str) { self.title = title.to_string(); } pub fn set_focused(&mut self, focused: bool) { self.focused = focused; } pub fn get_focused(&self) -> bool { self.focused } pub fn set_content(&mut self, content: &str) { self.content = content.to_string(); self.cursor = 0; } ... (remaining file content omitted) ... <|file_sep|>ced-master/src/widget.rs use ratatui::Frame; use ratatui::prelude::Rect; use crate::global::Global; pub trait Widget { fn draw(&mut self, frame: &mut Frame, rect: Rect, global: &Global); } <|file_sep|>ced-master/src/input_handler.rs use crate::global::Global; use getch_rs::Key; pub trait InputHandler { fn handle(&mut self, c: &Key, _global: &Global) -> bool; } <|file_sep|>ced-master/LICENSE MIT License Copyright (c) 2024 Yeong-won Seo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. <|file_sep|>ced-master/Cargo.toml [package] name = "ced" version = "0.1.0" edition = "2021" [dependencies] ratatui = "0" getch-rs = "0" nix = "0" [profile.release] strip = true opt-level = "z" <|file_sep|>ced-master/src/global.rs pub struct Global { current_file: String, shutdown: bool, } impl Global { pub fn new() -> Self { Self { current_file: String::new(), shutdown: false, } } pub fn current_file(&self) -> &str { &self.current_file } pub fn shutdown(&self) -> bool { self.shutdown } pub fn set_shutdown(&mut self) { self.shutdown = true; } }
volarjs/github-monaco
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: volarjs/github-monaco Repository Tree: └── github-monaco-master ├── .github │ └── workflows │ └── github-pages.yml ├── scripts │ ├── config.ts │ ├── plugin.ts │ ├── vite.lib.config.ts │ └── vite.worker.config.ts ├── src │ ├── env.ts │ ├── index.ts │ ├── types.ts │ ├── utils.ts │ └── volar.worker.ts ├── index.html ├── package.json ├── pnpm-lock.yaml ├── tsconfig.build.json ├── tsconfig.json └── vite.config.ts Code to be assessed: <|repo_name|>volarjs/github-monaco <|file_sep|>github-monaco-master/src/utils.ts import type { FileSystem } from "@volar/language-service"; import { createSys as _createSys } from "@volar/typescript"; import { UriResolver, decorateServiceEnvironment } from "@volar/cdn"; import { createServiceEnvironment } from "@volar/monaco/worker"; import * as ts from "typescript"; export function createSys(uriResolver: UriResolver, fs: FileSystem) { const env = createServiceEnvironment(); decorateServiceEnvironment(env, uriResolver, fs); return _createSys(ts as any, env); } export async function findTsConfig(dirName: string, sys: ReturnType<typeof createSys>) { let sysVersion: number | undefined; let tsconfig: string | undefined; while (await sys.sync() !== sysVersion) { sysVersion = sys.version; tsconfig = ts.findConfigFile(dirName, sys.fileExists); } return tsconfig; } export async function parseTsConfig(tsconfig: string, sys: ReturnType<typeof createSys>) { let sysVersion: number | undefined; let configFile: ts.TsConfigSourceFile; let parsed: ts.ParsedCommandLine; while (await sys.sync() !== sysVersion) { sysVersion = sys.version; try { configFile = ts.readJsonConfigFile(tsconfig, sys.readFile); parsed = ts.parseJsonSourceFileConfigFileContent(configFile, sys, tsconfig.substring(0, tsconfig.lastIndexOf('/')), {}, tsconfig); } catch { } } return parsed!; } <|file_sep|>github-monaco-master/scripts/vite.worker.config.ts import { defineConfig } from "vite"; import * as path from "path"; import { externalCjsToEsmPlugin } from "./plugin"; import { externals } from "./config"; export default defineConfig({ optimizeDeps: { exclude: externals, esbuildOptions: { plugins: [externalCjsToEsmPlugin(externals)], }, }, resolve: { alias: { path: "path-browserify", }, }, build: { minify: false, lib: { entry: path.resolve(__dirname, "../src/volar.worker.ts"), formats: ["es"], name: "volar.worker.js", }, sourcemap: false, outDir: path.resolve(__dirname, "../dist/worker"), rollupOptions: { output: { format: "es", entryFileNames: "[name].js", chunkFileNames: "[name].js", }, external: externals, }, }, }); <|file_sep|>github-monaco-master/scripts/vite.lib.config.ts import { defineConfig } from "vite"; import * as path from "path"; import { externalCjsToEsmPlugin } from "./plugin"; import { externals } from "./config"; export default defineConfig({ optimizeDeps: { exclude: externals, esbuildOptions: { plugins: [externalCjsToEsmPlugin(externals)], }, }, resolve: { alias: { path: "path-browserify", }, }, build: { minify: false, lib: { entry: path.resolve(__dirname, "../src/index.ts"), formats: ["es"], name: "index.js", }, outDir: path.resolve(__dirname, "../dist/lib"), sourcemap: true, rollupOptions: { output: { format: "es", entryFileNames: "[name].js", chunkFileNames: "[name].js", }, external: externals, }, }, }); <|file_sep|>github-monaco-master/src/volar.worker.ts import * as cdn from "@volar/cdn"; import { createLanguageHost, createLanguageService, createServiceEnvironment } from "@volar/monaco/worker"; import type * as monaco from "monaco-editor-core"; // @ts-expect-error import * as worker from "monaco-editor-core/esm/vs/editor/editor.worker"; import * as ts from "typescript"; import createTsService from "volar-service-typescript"; import type { CreateData } from "./types"; self.onmessage = () => { worker.initialize((ctx: monaco.worker.IWorkerContext<FileSystem>, data: CreateData) => { const env = createServiceEnvironment(); cdn.decorateServiceEnvironment(env, cdn.createGitHubUriResolver(/* /workspace */ data.rootPath, data.owner, data.repo, data.branch), cdn.createGitHubFs(data.owner, data.repo, data.branch)); cdn.decorateServiceEnvironment(env, cdn.createJsDelivrUriResolver('/node_modules'), cdn.createJsDelivrFs()); return createLanguageService( { typescript: ts as any }, env, { services: { typescript: createTsService() } }, createLanguageHost(ctx.getMirrorModels, env, data.rootPath, data.compilerOptions), ); }); }; <|file_sep|>github-monaco-master/src/env.ts // @ts-expect-error import editorWorker from "monaco-editor-core/esm/vs/editor/editor.worker?worker"; // @ts-expect-error import volarWorker from "./volar.worker?worker"; import * as onigasm from "onigasm"; // @ts-expect-error import onigasmWasm from "onigasm/lib/onigasm.wasm?url"; import type { LanguageService } from "@volar/language-service"; import { editor, languages } from "monaco-editor-core"; import * as volar from "@volar/monaco"; import { CreateData } from "./types"; export function loadOnigasm() { return onigasm.loadWASM(onigasmWasm); } export function setupMonacoEnv(createData: CreateData) { let initialized = false; (self as any).MonacoEnvironment ??= {}; (self as any).MonacoEnvironment.getWorker = (_: any, label: string) => { if (label === "volar") { return new volarWorker(); } return new editorWorker(); }; languages.register({ id: "typescript", extensions: [".ts"] }); languages.register({ id: "javascript", extensions: [".js"] }); languages.register({ id: "json", extensions: [".json"] }); languages.onLanguage("javascript", setup); languages.onLanguage("typescript", setup); languages.onLanguage("javascriptreact", setup); languages.onLanguage("typescriptreact", setup); languages.onLanguage("json", setup); function setup() { if (initialized) { return; } initialized = true; const worker = editor.createWebWorker<LanguageService>({ moduleId: "volarWorker", label: "volar", createData, }); const languageId = [ "javascript", "typescript", "javascriptreact", "typescriptreact", "json", ]; const getSyncUris = () => editor.getModels().map((model) => model.uri); volar.editor.activateMarkers( worker, languageId, "volar", getSyncUris, editor ); volar.editor.activateAutoInsertion(worker, languageId, getSyncUris, editor); volar.languages.registerProvides( worker, languageId, getSyncUris, languages ); } } <|file_sep|>github-monaco-master/index.html <!DOCTYPE html> <html lang="en" class="dark"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Volar for GitHub</title> <style> body { margin: 0; } #app { width: 100vw; height: 100vh; } </style> </head> <body> <div id="app"></div> <script type="module" src="./src/index.ts"></script> </body> </html> <|file_sep|>github-monaco-master/pnpm-lock.yaml lockfileVersion: '6.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false dependencies: onigasm: specifier: ^2.2.5 version: 2.2.5 devDependencies: '@types/node': specifier: ^20.3.3 version: 20.3.3 '@volar/cdn': specifier: 1.8.0 version: 1.8.0 '@volar/language-service': specifier: 1.8.0 version: 1.8.0 '@volar/monaco': specifier: 1.8.0 version: 1.8.0 '@volar/typescript': specifier: 1.8.0 version: 1.8.0 '@vue/reactivity': specifier: ^3.3.4 version: 3.3.4 '@vueuse/core': specifier: ^10.2.1 version: 10.2.1([email protected]) esbuild: specifier: ^0.18.11 version: 0.18.11 monaco-editor-core: specifier: ^0.39.0 version: 0.39.0 monaco-editor-textmate: specifier: ^4.0.0 version: 4.0.0([email protected])([email protected]) monaco-textmate: specifier: ^3.0.1 version: 3.0.1([email protected]) monaco-volar: specifier: ^0.4.0 version: 0.4.0 path-browserify: specifier: ^1.0.1 version: 1.0.1 typescript: specifier: ^5.1.6 version: 5.1.6 vite: specifier: ^4.3.9 version: 4.3.9(@types/[email protected]) vite-plugin-rewrite-all: specifier: ^1.0.1 version: 1.0.1([email protected]) volar-service-typescript: specifier: 0.0.9 version: 0.0.9(@volar/[email protected])(@volar/[email protected]) vscode-uri: specifier: ^3.0.7 version: 3.0.7 packages: /@babel/[email protected]: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} dev: true /@babel/[email protected]: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} dev: true /@babel/[email protected]: resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.22.5 dev: true /@babel/[email protected]: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 to-fast-properties: 2.0.0 dev: true /@esbuild/[email protected]: resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true /@esbuild/[email protected]: resolution: {integrity: sha512-snieiq75Z1z5LJX9cduSAjUr7vEI1Odlz ... (remaining file content omitted) ... <|file_sep|>github-monaco-master/vite.config.ts import { defineConfig } from "vite"; import * as path from "path"; import pluginRewriteAll from "vite-plugin-rewrite-all"; export default defineConfig({ base: '/github-monaco/', optimizeDeps: { include: ["path-browserify"], }, resolve: { alias: { path: "path-browserify", "vscode-uri": "vscode-uri/lib/umd", }, }, build: { minify: false, outDir: path.resolve(__dirname, "./out"), }, plugins: [pluginRewriteAll()], }); <|file_sep|>github-monaco-master/scripts/config.ts export const externals = [ "monaco-editor-core", "onigasm", "monaco-editor-textmate", "monaco-textmate", ]; <|file_sep|>github-monaco-master/src/types.ts export interface CreateData { owner: string; repo: string; branch: string; rootPath: string; compilerOptions: any; } <|file_sep|>github-monaco-master/scripts/plugin.ts import type { Plugin } from "esbuild"; export const externalCjsToEsmPlugin = (externals: string[]): Plugin => ({ name: "external", setup(build) { const escape = (text: string) => `^${text.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")}$`; const filter = new RegExp(externals.map(escape).join("|")); build.onResolve({ filter: /.*/, namespace: "external" }, (args) => ({ path: args.path, external: true, })); build.onResolve({ filter }, (args) => ({ path: args.path, namespace: "external", })); build.onLoad({ filter: /.*/, namespace: "external" }, (args) => ({ contents: `export * from ${JSON.stringify(args.path)}`, })); }, });
SorrowOfSpira/Desarrollo-Myapp
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: SorrowOfSpira/Desarrollo-Myapp Repository Tree: └── Desarrollo-Myapp-main ├── app │ ├── config.py │ ├── crud.py │ ├── database.py │ ├── main.py │ ├── models.py │ └── schemas.py ├── env │ ├── Scripts │ │ ├── activate │ │ ├── activate.bat │ │ ├── dul-receive-pack │ │ └── dul-upload-pack │ └── pyvenv.cfg ├── poetry.lock └── pyproject.toml Code to be assessed: <|repo_name|>SorrowOfSpira/Desarrollo-Myapp <|file_sep|>Desarrollo-Myapp-main/app/main.py # Implementacón de FastAPI from fastapi import FastAPI,Depends,HTTPException from sqlalchemy.orm import Session from typing import List from.import crud,models,schemas from.database import engine,get_db app=FastAPI() models.Base.metadata.create_all(bind=engine) @app.post("/clientes/",response_model=schemas.Cliente) def create_cliente(cliente:schemas.ClienteCreate,db:Session=Depends(get_db)): return crud.create_cliente(db=db,cliente=cliente) @app.get("/cleintes/",response_model=List[schemas.Cliente]) def read_clientes(skip:int=0,limit:int=10,db:Session=Depends(get_db)): return crud.get_clientes(db=db,skip=skip,limit=limit) @app.get("/clientes/{cliente_id}",response_model=schemas.Cliente) def read_cliente(cleinte_id:int,db:Session=Depends(get_db)): db_cliente=crud.get_cliente(db=db,cliente_id=cliente_id) if db_cliente is None: raise HTTPException(status_code=404,detail="Cliente no encontrado") return db_cliente @app.put("/clientes/{cliente_id}",response_model=schemas.Cliente) def update_cliente(cliente_id:int,cliente:schemas.ClienteCreate,db:Session=Depends(get_db)): return crud.update_cliente(db=db,cliente_id=cliente_id,cliente=cliente) @app.delete("/clientes/{cliente_id}",response_model=dict) def delete_cliente(cliente_id:int,db:Session=Depends(get_db)): crud.delete_cliente(db=db,cliente_id=cliente_id) return{"detail":"Cliente eliminado"} @app.post("/productos/",response_model=schemas.Producto) def create_producto(producto:schemas.ProductoCreate,cliente_id:int,db:Session=Depends(get_db)): return crud.crate_producto(db=db,producto=producto,cliente_id=cliente_id) @app.get("/productos/{productos_id}",response_model=List[schemas.Producto]) def read_productos(skip:int=0,limit:int=10,db:Session=Depends(get_db)): return crud.get_productos(db=db,skip=skip,limit=limit) @app.get("/productos/{producto_id}",response_model=schemas.Producto) def read_producto(producto_id:int,db:Session=Depends(get_db)): db_producto=crud.get_producto(db=db,producto_id=producto_id) if db_producto in None: raise HTTPException(status_code=404,detail="Producto no encontrado") return db_producto @app.put("/productos/{producto_id}",response_model=schemas.Producto) def update_producto(producto_id:int,producto:schemas.ProductoCreate,db:Session=Depends(get_db)): return crud.update_producto(db=db,producto_id=producto_id,producto=producto) @app.delete("/productos/{producto_id}") def delete_producto(producto_id:int,db:Session=Depends(get_db)): crud.delete_producto(db=db,producto_id=producto_id) return{"detail":"Producto eliminado"} <|file_sep|>Desarrollo-Myapp-main/app/config.py from app import models from app.database import engine def setup_database(): print("Creando tablas en la base de datos...") models.Base.metadata.create_all(bind=engine) print("Tablas creadas con éxito.") if __name__=="__main__": setup_database() <|file_sep|>Desarrollo-Myapp-main/app/crud.py #funciones CRUD from sqlalchemy.orm import Session from.import models,schemas def create_cliente(db:Session,cliente:schemas.ClienteCreate): db_cliente=models.Cliente(nombre=cliente.nombre) #email=cliente.email) db.add(db_cliente) db.commit() db.refresh(db_cliente) return db_cliente def get_clientes(db:Session,skip:int=0,limit:int=10): return db.query(models.Cliente).offset(skip).limit(limit).all() def get_cliente(db:Session,cliente_id:int): return db.query(models.Cliente).filter(models.Cliente.id==cliente_id).first() def update_cliente(db:Session,cliente_id:int,cliente:schemas.ClienteCreate): db_cliente=db.query(models.Cliente).filter(models.CLiente.id==cliente_id).first() db_cliente.nombre=cliente.nombre #db_cliente.email = cliente.email db.commit() db.refresh(db_cliente) return db_cliente def delete_cliente(db:Session,cliente_id:int): db_cliente=db.query(models.Cliente).filter(models.Cliente.id==cliente_id).first() db.delete(db_cliente) db.commit() return db_cliente def crate_producto(db:Session,producto:schemas.ProductoCreate,cliente_id:int): db_producto=models.Producto(nombre=producto.nombre,precio=producto.precio,cliente_id=cliente_id) db.add(db_producto) db.commit() db.refresh(db_producto) return db_producto def get_productos(db:Session,skip:int=0,limit:int=10): return db.quety(models.Producto).offset(skip.limit(limit).all()) def get_producto(db:Session,producto_id:int): return db.query(models.Producto).filter(models.Producto.id==producto_id).first() def update_producto(db:Session,producto_id:int,producto:schemas.ProductoCreate): db_producto=db.query(models.Producto).filter(models.Producto.id==producto_id).first() db_producto.precio=producto.precio db.commit() db.refresh(db_producto) return db_producto def delete_producto(db:Session,producto_id:int): db_producto=db.query(models.Producto).filter(models.Producto.id==producto_id).first() db.delete(db_producto) db.commit() return db_producto <|file_sep|>Desarrollo-Myapp-main/app/database.py from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from.models import Base # Usar SQLite en lugar de PostgreSQL DATABASE_URL="sqlite:///./test.db" engine=create_engine( DATABASE_URL,connect_args={"check_same_thread":False} ) SessionLocal=sessionmaker(autocommit=False,autoflush=False,bind=engine) Base.metadata.create_all(bind=engine) def get_db(): db=SessionLocal() try: yield db finally: db.close() <|file_sep|>Desarrollo-Myapp-main/env/Scripts/dul-receive-pack #!C:\Users\Franco\Desktop\Desarrollo-Myapp\env\Scripts\python.exe # dul-receive-pack - git-receive-pack in python # Copyright (C) 2008 John Carr <[email protected]> # # Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU # General Public License as public by the Free Software Foundation; version 2.0 # or (at your option) any later version. You can redistribute it and/or # modify it under the terms of either of these two licenses. # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # You should have received a copy of the licenses; if not, see # <http://www.gnu.org/licenses/> for a copy of the GNU General Public License # and <http://www.apache.org/licenses/LICENSE-2.0> for a copy of the Apache # License, Version 2.0. # import os import sys from dulwich.porcelain import receive_pack if len(sys.argv) < 2: sys.stderr.write("usage: %s <git-dir>\n" % os.path.basename(sys.argv[0])) sys.exit(1) sys.exit(receive_pack(sys.argv[1])) <|file_sep|>Desarrollo-Myapp-main/pyproject.toml [tool.poetry] name = "mi desarrollo app" version = "0.1.0" description = "Mi primera aplicacion" authors = ["Franquito"] license = "Todas" readme = "README.md" package-mode = false [tool.poetry.dependencies] python = "^3.10" fastapi = "^0.114.1" uvicorn = "^0.30.6" sqlalchemy = "^2.0.34" pydantic = "^2.9.1" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" <|file_sep|>Desarrollo-Myapp-main/env/Scripts/dul-upload-pack #!C:\Users\Franco\Desktop\Desarrollo-Myapp\env\Scripts\python.exe # dul-upload-pack - git-upload-pack in python # Copyright (C) 2008 John Carr <[email protected]> # # Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU # General Public License as public by the Free Software Foundation; version 2.0 # or (at your option) any later version. You can redistribute it and/or # modify it under the terms of either of these two licenses. # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # You should have received a copy of the licenses; if not, see # <http://www.gnu.org/licenses/> for a copy of the GNU General Public License # and <http://www.apache.org/licenses/LICENSE-2.0> for a copy of the Apache # License, Version 2.0. # import os import sys from dulwich.porcelain import upload_pack if len(sys.argv) < 2: sys.stderr.write("usage: %s <git-dir>\n" % os.path.basename(sys.argv[0])) sys.exit(1) sys.exit(upload_pack(sys.argv[1])) <|file_sep|>Desarrollo-Myapp-main/env/Scripts/activate # This file must be used with "source bin/activate" *from bash* # You cannot run it directly deactivate () { # reset old environment variables if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then PATH="${_OLD_VIRTUAL_PATH:-}" export PATH unset _OLD_VIRTUAL_PATH fi if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" export PYTHONHOME unset _OLD_VIRTUAL_PYTHONHOME fi # Call hash to forget past commands. Without forgetting # past commands the $PATH changes we made may not be respected hash -r 2> /dev/null if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then PS1="${_OLD_VIRTUAL_PS1:-}" export PS1 unset _OLD_VIRTUAL_PS1 fi unset VIRTUAL_ENV unset VIRTUAL_ENV_PROMPT if [ ! "${1:-}" = "nondestructive" ] ; then # Self destruct! unset -f deactivate fi } # unset irrelevant variables deactivate nondestructive # on Windows, a path can contain colons and backslashes and has to be converted: if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then # transform D:\path\to\venv to /d/path/to/venv on MSYS # and to /cygdrive/d/path/to/venv on Cygwin export VIRTUAL_ENV=$(cygpath "C:\Users\Franco\Desktop\Desarrollo-Myapp\env") else # use the path as-is export VIRTUAL_ENV="C:\Users\Franco\Desktop\Desarrollo-Myapp\env" fi _OLD_VIRTUAL_PATH="$PATH" PATH="$VIRTUAL_ENV/Scripts:$PATH" export PATH # unset PYTHONHOME if set # this will fail if PYTHONHOME is set to the empty string (which is bad anyway) # could use `if (set -u; : $PYTHONHOME) ;` in bash if [ -n "${PYTHONHOME:-}" ] ; then _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" unset PYTHONHOME fi if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then _OLD_VIRTUAL_PS1="${PS1:-}" PS1="(env) ${PS1:-}" export PS1 VIRTUAL_ENV_PROMPT="(env) " export VIRTUAL_ENV_PROMPT fi # Call hash to forget past commands. Without forgetting # past commands the $PATH changes we made may not be respected hash -r 2> /dev/null <|file_sep|>Desarrollo-Myapp-main/app/schemas.py #Crear los esquemas Pydantic from pydantic import BaseModel from typing import List,Optional class ProductoBase(BaseModel): nombre:str precio:float class ProductoCreate(ProductoBase): pass class Producto(ProductoBase): id:int cliente_id:int class Config: orm_mode=True class ClienteBase(BaseModel): nombre:str #email: str class ClienteCreate(ClienteBase): pass class Cliente(ClienteBase): id:int productos:List[Producto]=[] class Config: orm_mode=True <|file_sep|>Desarrollo-Myapp-main/app/models.py # Definición de las tablas from sqlalchemy import Column,Integer,String,Float,ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship Base=declarative_base() class Cliente(Base): __tablename__="clientes" id=Column(Integer,primary_key=True,index=True) nombre=Column(String,index=True) #email = Column(String, unique=True, index=True) productos=relationship("Producto",back_populates="cliente") class Producto(Base): __tablename__="productos" id=Column(Integer,primary_key=True,index=True) nombre=Column(String,index=True) precio=Column(Float) cliente_id=Column(Integer,ForeignKey("clientes.id")) # Clave foránea añadida cliente=relationship("Cliente",back_populates="productos") <|file_sep|>Desarrollo-Myapp-main/env/Scripts/activate.bat @echo off rem This file is UTF-8 encoded, so we need to update the current code page while executing it for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do ( set _OLD_CODEPAGE=%%a ) if defined _OLD_CODEPAGE ( "%SystemRoot%\System32\chcp.com" 65001 > nul ) set VIRTUAL_ENV=C:\Users\Franco\Desktop\Desarrollo-Myapp\env if not defined PROMPT set PROMPT=$P$G if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT% if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME% set _OLD_VIRTUAL_PROMPT=%PROMPT% set PROMPT=(env) %PROMPT% if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% set PYTHONHOME= if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% set PATH=%VIRTUAL_ENV%\Scripts;%PATH% set VIRTUAL_ENV_PROMPT=(env) :END if defined _OLD_CODEPAGE ( "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul set _OLD_CODEPAGE= ) <|file_sep|>Desarrollo-Myapp-main/env/pyvenv.cfg home = C:\Users\Franco\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0 include-system-site-packages = false version = 3.12.6 executable = C:\Users\Franco\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe command = C:\Users\Franco\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe -m venv C:\Users\Franco\Desktop\Desarrollo-Myapp\env
aryanlakhanpal/video_gram
You are an expert evaluator of coding. Please carefully evaluate the repository below based on the specific evaluation criteria essential for its potential use in pretraining a large language model. You are also provided with the repository's file tree to assist in assessing the overall structure and organization. Your response must be structured strictly in **YAML format** with the following keys: 1. **Summary**: A brief summary that explains the core features, functionality, technologies used, and the overall purpose of the repository. 2. **KeyDetails**: Extract concrete implementation details that reflect the repository's architecture and design choices. Focus on how modules interact, how workflows are built across files, and which design decisions are central to the repository's functionality. Reference specific file paths, functions, or classes where possible. - If the code does not contain meaningful internal logic (e.g., trivial scripts or placeholder files), then set this field to **"No KeyDetails"**. 3. **Weaknesses**: Identify potential weaknesses, limitations, or areas for improvement in the repository. This may include poor modularity, lack of documentation, suboptimal performance, overly complex dependencies, or any other issues that could impact maintainability or usability. 4. **Rating**: A numerical rating to the repository on a scale from 1 to 10, where 1 indicates the lowest quality and 10 indicates the highest quality. Do not include any explanation or commentary in the output, only the YAML with the four fields. **KeyDetails may cover (if present in the repository)**: - **Cross-File Workflows**: How data, parameters, or control flow move between key modules, and explicitly explain how different modules work together to achieve the repository's functionality. - **Architecture & Module Design**: How the repository is structured into directories and files, and how responsibilities are divided. First describe what each module's functionality is and how it is implemented, then clearly point out which modules are key and explain why they are critical. - **Configuration & Initialization**: How configuration is handled (e.g., config files, environment variables, command-line arguments). - **Reusability**: Shared utility functions, base classes, or components that are reused across the project. - **Robustness & Performance**: Strategies for error handling, logging, scalability, or optimization. - **Documentation & Testing**: Presence of README, examples, tests, or CI/CD scripts that demonstrate usage and maintainability. **Criteria for Evaluation**: * Code Quality: * Clear, readable, and maintainable code. * Proper commenting, meaningful naming conventions, and logical structure. * Consistent formatting adhering to industry standards. * Completeness of Functionality: * Implementation covers main features expected based on repository description. * Functionality aligns closely with stated goals and objectives. * Usability: * Clear and informative documentation (README, comments, wiki). * Easy-to-follow setup, installation, and usage instructions. * Availability of practical examples or demos. * Diversity of Tech Stack: * Appropriate variety and integration of programming languages, tools, frameworks, or libraries. * Effective use of technologies without unnecessary complexity. * Project Structure Clarity: * Logical and intuitive organization of files and directories. * Clear separation of concerns across files/modules with proper abstraction and modularity. * Reasonable cross-file/module dependencies with effective utilization of shared components. After reviewing the provided repository and its file tree, generate a brief summary, extract the key implementation details (only the ones relevant in the repository or "No KeyDetails"), identify potential weaknesses, and finally conclude with the rating based on the given criteria. Your output must strictly follow the YAML format. Example Output: ```yaml Summary: [Brief summary of the repository] KeyDetails: - | Cross-File Logic: [Description of important workflows or data flow across modules] - | Module & Architecture Design: [Explanation of directory structure, modularization, each module’s functionality and implementation, and then highlight the key modules and why they are critical] - | Configuration & Setup: [Centralized config or initialization approach] - | Documentation & Testing: [Tests, examples, documentation coverage, and file tree insights] Weaknesses: - [Potential weakness or area for improvement 1] - [Potential weakness or area for improvement 2] Rating: [Numerical rating from 1-10] ``` REPOSITORY: aryanlakhanpal/video_gram Repository Tree: └── video_gram-main ├── app │ ├── (auth) │ │ ├── sign-in │ │ │ └── [[...sign-in]] │ │ │ └── page.tsx │ │ └── sign-up │ │ └── [[...sign-up]] │ │ └── page.tsx │ ├── (root) │ │ ├── (home) │ │ │ ├── personal-room │ │ │ │ └── page.tsx │ │ │ ├── previous │ │ │ │ └── page.tsx │ │ │ ├── recordings │ │ │ │ └── page.tsx │ │ │ ├── upcoming │ │ │ │ └── page.tsx │ │ │ ├── layout.tsx │ │ │ └── page.tsx │ │ ├── meeting │ │ │ └── [id] │ │ │ └── page.tsx │ │ └── layout.tsx │ ├── globals.css │ └── layout.tsx ├── components │ ├── ui │ │ └── MobileNav.tsx │ ├── Navbar.tsx │ └── Sidebar.tsx ├── constants │ └── index.ts ├── middleware.ts ├── package-lock.json ├── package.json └── tailwind.config.ts Code to be assessed: <|repo_name|>aryanlakhanpal/video_gram <|file_sep|>video_gram-main/components/Navbar.tsx import Image from "next/image"; import Link from "next/link"; import React from "react"; import MobileNav from "./ui/MobileNav"; import { SignedIn, UserButton } from "@clerk/nextjs"; const Navbar = () => { return ( <nav className="flex-between fixed z-50 w-full bg-dark-1 px-6 py-4 lg:px-10 "> <Link href="/" className="flex items-center gap-1"> <Image src="/icons/logo.svg" width={32} height={32} alt="Video-gram" className="max-sm:size-10" /> <p className="text-[26px] font-extrabold text-white max-sm:hidden"> Video Gram </p> </Link> <div className="flex-between gap-5"> {/* clerk user management */} <SignedIn> <UserButton /> </SignedIn> <MobileNav /> </div> </nav> ); }; export default Navbar; <|file_sep|>video_gram-main/app/(root)/(home)/layout.tsx import Navbar from '@/components/Navbar' import Sidebar from '@/components/Sidebar' import React, { ReactNode } from 'react' const HomeLayout = ({children}:{children:ReactNode}) => { return ( <> <main className= 'relative'> <Navbar /> <div className='flex'> <Sidebar/> <section className='flex min-h-screen flex-1 flex-col px-6 pt-28 pb-6 max-md:pb-14 sm:px-14'> <div className='w-full'> {children} </div> </section> </div> </main> </> ) } export default HomeLayout <|file_sep|>video_gram-main/app/layout.tsx import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./globals.css"; import { ClerkProvider } from "@clerk/nextjs"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { title: "Create Next App", description: "Generated by create next app", }; export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { return ( <html lang="en"> <ClerkProvider appearance={ { layout:{ logoImageUrl:'/icons/yoom-logo.svg', socialButtonsVariant:'iconButton' }, variables:{ colorText:'#fff', colorPrimary:'#0E78F9', colorBackground:'#1c1f2e', colorInputBackground:'#252a41', colorInputText:'#fff', } } }> <body className={`${inter.className} bg-dark-2`}>{children}</body> </ClerkProvider> </html> ); } <|file_sep|>video_gram-main/components/Sidebar.tsx "use client" import { sidebarLinks } from '@/constants' import { usePathname } from 'next/navigation' import React from 'react' import Link from 'next/link' import { cn } from '@/lib/utils' import Image from 'next/image' const Sidebar = () => { const pathname = usePathname(); return( <section className='sticky left-0 top-0 flex h-screen w-fit flex-col justify-between bg-dark-1 p-6 pt-28 text-white max-sm:hidden lg:w-{264px'> <div className='flex flex-col gap-6'> {sidebarLinks.map((link)=>{ const isActive = pathname=== link.route ||pathname.startsWith(`${link.route}/`); return( <Link href={link.route} key={link.label} className={cn('flex gap-4 items-center p-4 rounded-lg justify-start',{ 'bg-blue-1':isActive, })}> <Image src={link.imgUrl} alt={link.label} width={24} height={24}/> <p className='text-lg font-semibold max-lg:hidden'>{link.label}</p> </Link> ) })} </div> </section> ) } export default Sidebar <|file_sep|>video_gram-main/app/globals.css @tailwind base; @tailwind components; @tailwind utilities; * { margin: 0; padding: 0; box-sizing: border-box; } /* ======== stream css overrides ======== */ .str-video__call-stats { max-width: 500px; position: relative; } .str-video__speaker-layout__wrapper { max-height: 700px; } .str-video__participant-details { color: white; } .str-video__menu-container { color: white; } .str-video__notification { color: white; } .str-video__participant-list { background-color: #1c1f2e; padding: 10px; border-radius: 10px; color: white; height: 100%; } .str-video__call-controls__button { height: 40px; } .glassmorphism { background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); } .glassmorphism2 { background: rgba(18, 17, 17, 0.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); } /* ==== clerk class override ===== */ .cl-providerIcon__github{ filter: invert(1); } .cl-userButtonPopoverActionButtonIcon { color: white; } .cl-logoBox { height: 40px; } .cl-dividerLine { background: #252a41; height: 2px; } .cl-socialButtonsIconButton { border: 3px solid #565761; } .cl-internal-wkkub3 { color: white; } .cl-userButtonPopoverActionButton { color: white; } /* =============================== */ @layer utilities { .flex-center { @apply flex justify-center items-center; } .flex-between { @apply flex justify-between items-center; } } /* animation */ .show-block { width: 100%; max-width: 350px; display: block; animation: show 0.7s forwards linear; } @keyframes show { 0% { animation-timing-function: ease-in; width: 0%; } 100% { animation-timing-function: ease-in; width: 100%; } } <|file_sep|>video_gram-main/app/(root)/layout.tsx import React, { ReactNode } from 'react' const Rootlayout = ({children}:{children:ReactNode}) => { return ( <> <main> {children} </main> </> ) } export default Rootlayout <|file_sep|>video_gram-main/components/ui/MobileNav.tsx "use client"; import Image from "next/image"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Sheet, SheetClose, SheetContent, SheetTrigger, } from "@/components/ui/sheet"; import { sidebarLinks } from "@/constants"; import { cn } from "@/lib/utils"; const MobileNav = () => { const pathname = usePathname(); return ( <section className="w-full max-w-[264px]"> <Sheet> <SheetTrigger asChild> <Image src="/icons/hamburger.svg" width={36} height={36} alt="hamburger icon" className="cursor-pointer sm:hidden" /> </SheetTrigger> <SheetContent side="left" className="border-none bg-dark-1"> <Link href="/" className="flex items-center gap-1"> <Image src="/icons/logo.svg" width={32} height={32} alt="yoom logo" /> <p className="text-[26px] font-extrabold text-white">YOOM</p> </Link> <div className="flex h-[calc(100vh-72px)] flex-col justify-between overflow-y-auto"> <SheetClose asChild> <section className=" flex h-full flex-col gap-6 pt-16 text-white"> {sidebarLinks.map((item) => { const isActive = pathname=== item.route ||pathname.startsWith(`${item.route}/`) return ( <SheetClose asChild key={item.route}> <Link href={item.route} key={item.label} className={cn( "flex gap-4 items-center p-4 rounded-lg w-full max-w-60", { "bg-blue-1": isActive, } )} > <Image src={item.imgUrl} alt={item.label} width={20} height={20} /> <p className="font-semibold">{item.label}</p> </Link> </SheetClose> ); })} </section> </SheetClose> </div> </SheetContent> </Sheet> </section> ); }; export default MobileNav; <|file_sep|>video_gram-main/tailwind.config.ts import type { Config } from "tailwindcss" const config = { darkMode: ["class"], content: [ './pages/**/*.{ts,tsx}', './components/**/*.{ts,tsx}', './app/**/*.{ts,tsx}', './src/**/*.{ts,tsx}', ], prefix: "", theme: { container: { center: true, padding: "2rem", screens: { "2xl": "1400px", }, }, extend: { colors: { dark:{ 1:"#1C1F2E", 2:"#161925", }, blue:{ 1:"#0E78F9" }, border: "hsl(var(--border))", input: "hsl(var(--input))", ring: "hsl(var(--ring))", background: "hsl(var(--background))", foreground: "hsl(var(--foreground))", primary: { DEFAULT: "hsl(var(--primary))", foreground: "hsl(var(--primary-foreground))", }, secondary: { DEFAULT: "hsl(var(--secondary))", foreground: "hsl(var(--secondary-foreground))", }, destructive: { DEFAULT: "hsl(var(--destructive))", foreground: "hsl(var(--destructive-foreground))", }, muted: { DEFAULT: "hsl(var(--muted))", foreground: "hsl(var(--muted-foreground))", }, accent: { DEFAULT: "hsl(var(--accent))", foreground: "hsl(var(--accent-foreground))", }, popover: { DEFAULT: "hsl(var(--popover))", foreground: "hsl(var(--popover-foreground))", }, card: { DEFAULT: "hsl(var(--card))", foreground: "hsl(var(--card-foreground))", }, }, borderRadius: { lg: "var(--radius)", md: "calc(var(--radius) - 2px)", sm: "calc(var(--radius) - 4px)", }, keyframes: { "accordion-down": { from: { height: "0" }, to: { height: "var(--radix-accordion-content-height)" }, }, "accordion-up": { from: { height: "var(--radix-accordion-content-height)" }, to: { height: "0" }, }, }, animation: { "accordion-down": "accordion-down 0.2s ease-out", "accordion-up": "accordion-up 0.2s ease-out", }, }, }, plugins: [require("tailwindcss-animate")], } satisfies Config export default config <|file_sep|>video_gram-main/app/(root)/meeting/[id]/page.tsx import React from 'react' const Meeting = ({params}:{params :{id:string}}) => { return ( <div>Meeting Room : #{params.id}</div> ) } export default Meeting <|file_sep|>video_gram-main/app/(root)/(home)/previous/page.tsx import React from 'react' const Previous = () => { return ( <section className='flex size-full flex-col gap-10 text-white'> <h1 className='text-3xl font-bold'> Previous </h1> </section> ) } export default Previous <|file_sep|>video_gram-main/app/(root)/(home)/page.tsx import React from 'react' const Home = () => { return ( <section className='flex size-full flex-col gap-10 text-white'> <h1 className='text-3xl font-bold'> Home </h1> </section> ) } export default Home <|file_sep|>video_gram-main/app/(auth)/sign-in/[[...sign-in]]/page.tsx import { SignIn } from '@clerk/nextjs' import React from 'react' const SignInPage = () => { return ( <main className='flex h-screen w-full items-center justify-center'> <SignIn /> </main> ) } export default SignInPage <|file_sep|>video_gram-main/app/(root)/(home)/upcoming/page.tsx import React from 'react' const Upcoming = () => { return ( <section className='flex size-full flex-col gap-10 text-white'> <h1 className='text-3xl font-bold'> Upcoming </h1> </section> ) } export default Upcoming <|file_sep|>video_gram-main/middleware.ts import { clerkMiddleware ,createRouteMatcher} from "@clerk/nextjs/server"; const protectedRoutes = createRouteMatcher( [ '/', '/upcoming', '/recording', '/personal-room', '/meeting(.*)' ] ) export default clerkMiddleware((auth,req)=>{ if(protectedRoutes(req)) auth().protect(); }); export const config = { matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'], }; <|file_sep|>video_gram-main/app/(root)/(home)/recordings/page.tsx import React from 'react' const Recordings = () => { return ( <section className='flex size-full flex-col gap-10 text-white'> <h1 className='text-3xl font-bold'> Recording </h1> </section> ) } export default Recordings <|file_sep|>video_gram-main/app/(auth)/sign-up/[[...sign-up]]/page.tsx import { SignUp } from '@clerk/nextjs' import React from 'react' const SignUpPage = () => { return ( <main className='flex h-screen w-full items-center justify-center'> <SignUp /> </main> ) } export default SignUpPage <|file_sep|>video_gram-main/app/(root)/(home)/personal-room/page.tsx import React from 'react' const PersonalRoom = () => { return ( <section className='flex size-full flex-col gap-10 text-white'> <h1 className='text-3xl font-bold'> Personal Room </h1> </section> ) } export default PersonalRoom
End of preview.

No dataset card yet

Downloads last month
1,435