Skip to content

aymenBenadra/YouDev

Repository files navigation

YouDev - Share your accomplishments with the world and get hired by the best companies around

YouDev is a platform that allows you to share your completed projects with other developers and companies and get hired by the best companies around.

Table of Contents

Pages

  • Home Page
    • Users Auth Page
    • Companies Auth Page
  • Projects page
    • Show Project Page
    • Create Project Page
    • Update Project Page
    • Delete Project
  • Offers page
    • Show Offer Page
    • Create Offer Page
    • Update Offer Page
    • Delete Offer

Definitions

Project Modelization

Original Enterprise Architect project model: YouDev.eapx

Use case diagram

PNG version

PDF version

Class diagram

PNG version

PDF version

SQL Queries

  1. Creating Database:

    CREATE DATABASE IF NOT EXISTS `youdev`;
  2. Using Database:

    USE `youdev`;
  3. Creating Tables:

    1. Users:

      CREATE TABLE IF NOT EXISTS `users` (
          `id` int(11) NOT NULL AUTO_INCREMENT,
          `first_name` varchar(255) NOT NULL,
          `last_name` varchar(255) NOT NULL,
          `email` varchar(255) NOT NULL UNIQUE,
          `password` varchar(255) NOT NULL,
          PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    2. Projects:

      CREATE TABLE IF NOT EXISTS `projects` (
          `id` int(11) NOT NULL AUTO_INCREMENT,
          `user_id` int(11) NOT NULL,
          `title` varchar(255) NOT NULL,
          `description` text NOT NULL,
          `github_link` varchar(255) NOT NULL,
          `design_link` varchar(255) NOT NULL,
          `image_link` varchar(255) NOT NULL,
          `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
          `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
          PRIMARY KEY (`id`),
          FOREIGN KEY (`user_id`) REFERENCES `users`(`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    3. Companies:

      CREATE TABLE IF NOT EXISTS `companies` (
          `id` int(11) NOT NULL AUTO_INCREMENT,
          `name` varchar(255) NOT NULL UNIQUE,
          `password` text NOT NULL,
          `website_link` varchar(255) NOT NULL,
          `logo_link` varchar(255) NOT NULL,
          PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    4. Offers:

      CREATE TABLE IF NOT EXISTS `offers` (
          `id` int(11) NOT NULL AUTO_INCREMENT,
          `company_id` int(11) NOT NULL,
          `title` varchar(255) NOT NULL,
          `description` text NOT NULL,
          `application_link` varchar(255) NOT NULL,
          `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
          PRIMARY KEY (`id`),
          `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
          FOREIGN KEY (`company_id`) REFERENCES `companies`(`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  4. Adding data:

    1. Users:

      INSERT INTO `users` (`first_name`, `last_name`, `email`, `password`) VALUES
      ('John', 'Doe', '[email protected]', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'),
      ('Jane', 'Doe', '[email protected]', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm');
    2. Companies:

      INSERT INTO `companies` (`name`, `password`, `website_link`, `logo_link`) VALUES
      ('Google', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', 'https://www.google.com', 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'),
      ('Facebook', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', 'https://www.facebook.com', 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/F_icon.svg/1200px-F_icon.svg.png');
    3. Projects:

      INSERT INTO `projects` (`user_id`, `title`, `description`, `github_link`, `design_link`, `image_link`) VALUES
      (1, 'YouDev', 'A web application for developers', 'github.com/youdev', 'https://youdev.com', 'https://youdev.com/images/youdev.png'),
      (2, 'Todo list', 'A todo list web application', 'github.com/todolist', 'https://todolist.com', 'https://youdev.com/images/todolist.png');
    4. Offers:

      INSERT INTO `offers` (`company_id`, `title`, `description`, `application_link`) VALUES
      (1, 'Full-stack developer', 'We are looking for a full-stack developer to join our team', 'https://youdev.com/jobs'),
      (2, 'Full-stack developer', 'We are looking for a full-stack developer to join our team', 'https://youdev.com/jobs');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published